Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge recent LLVM changes #20

Merged
merged 2,770 commits into from
Feb 6, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
2770 commits
Select commit Hold shift + click to select a range
4877715
Revert "[ThinLTO] Rename COMDATs for COFF when promoting/renaming COM…
teresajohnson Jan 31, 2019
4ec1599
revert r352766: [PatternMatch] add special-case uaddo matching for in…
rotateright Jan 31, 2019
f59242e
Recommit "[ThinLTO] Rename COMDATs for COFF when promoting/renaming C…
teresajohnson Jan 31, 2019
c1892ec
[CallSite removal] Remove CallSite uses from InstCombine.
topperc Jan 31, 2019
d03bf06
Fix use of non-existing variable in crashlog.py
shafik Jan 31, 2019
d04a2d2
[X86][AVX] insert_subvector(bitcast(v), bitcast(s), c1) -> bitcast(in…
RKSimon Jan 31, 2019
eb6aef6
[X86][AVX] Fold concat(broadcast(x),broadcast(x)) -> broadcast(x)
RKSimon Jan 31, 2019
00cefe1
Trim trailing whitespace. NFCI.
RKSimon Jan 31, 2019
9f4563b
[ADT] Fix a typo in isOSVersionLT that breaks the Micro version check
bob-wilson Jan 31, 2019
4b94d25
GlobalISel: Fix handling of vectors of pointers in clamp{Min,Max}NumE…
arsenm Jan 31, 2019
02a86e6
[libFuzzer] relax a flaky test
kcc Jan 31, 2019
ede49dd
Lower widenable_conditions in CGP
preames Jan 31, 2019
043ff33
[unittest] Fix scalar unit test.
JDevlieghere Jan 31, 2019
dd426c2
Fix a bit of libc++-specific behavior in the regex tests; add a missi…
mclow Jan 31, 2019
a8f0745
Revert "[X86] Mark EMMS and FEMMS as clobbering MM0-7 and ST0-7."
topperc Jan 31, 2019
ae527ac
[Intrinsic] Expand SMULFIX to MUL, MULH[US], or [US]MUL_LOHI on vecto…
PiJoules Jan 31, 2019
4061b44
[DAG] Aggressively cleanup dangling node in CombineZExtLogicopShiftLoad.
niravhdave Jan 31, 2019
82937e4
[ELF] Return the section name when calling getSymbolName on a section…
Jan 31, 2019
b792299
[DAG][SystemZ] Define unwrapAddress for PCREL_WRAPPER.
niravhdave Jan 31, 2019
240a90a
[MemorySSA] Extend removeMemoryAccess API to optimize MemoryPhis.
alinas Jan 31, 2019
4f9543b
[CodeComplete] Propagate preferred types through parser in more cases
ilya-biryukov Jan 31, 2019
fc7faec
[fuzzer] Use RawPrint instead of Printf for instrumentation warning
jonathanmetzman Jan 31, 2019
e1b332e
[cmake] Note future cleanup in comment. NFC
smeenai Jan 31, 2019
f47d6b3
[opaque pointer types] Add a FunctionCallee wrapper type, and use it.
jyknight Jan 31, 2019
0bed9e0
[DAGCombine] Avoid CombineZExtLogicopShiftLoad if there is free ZEXT
weiguozhi Jan 31, 2019
88058d4
[WebAssembly] Add bulk memory target feature
tlively Jan 31, 2019
e271889
[EarlyCSE & MSSA] Cleanup special handling for removing MemoryAccesses.
alinas Jan 31, 2019
0bd6b91
Fix compilation error with GCC after r352791.
jyknight Jan 31, 2019
4399878
[clangd] A code action to swap branches of an if statement
ilya-biryukov Jan 31, 2019
8fa28a0
[CUDA] Propagate detected version of CUDA to cc1
Artem-B Jan 31, 2019
c62214d
[CUDA] add support for the new kernel launch API in CUDA-9.2+.
Artem-B Jan 31, 2019
fadf250
Revert "[opaque pointer types] Add a FunctionCallee wrapper type, and…
jyknight Jan 31, 2019
277e064
Do not copy long double and 128-bit fp format from aux target for AMDGPU
yxsamliu Jan 31, 2019
8f6182f
[Hexagon] Rename textually included file from .h to .inc
Weverything Jan 31, 2019
0abcafd
Make clang/test/Index/pch-from-libclang.c pass in more places
nico Jan 31, 2019
9560b79
[ASTDump] Make template specialization tests more exact
steveire Jan 31, 2019
d16ca2f
[x86] add test for missed opportunity to use 'inc'; NFC
rotateright Jan 31, 2019
c0affde
[WebAssembly] MC: Fix for outputing wasm object to /dev/null
sbc100 Jan 31, 2019
d834d83
[RISCV] Add RV64F codegen support
asb Jan 31, 2019
c944462
Re-disable pch-from-libclang.c after 352803, some buildbots are still…
nico Jan 31, 2019
5f563f0
Fixed hasLinkerPrivateGlobalPrefix treating StringRef as C String.
aardappel Jan 31, 2019
62bb58a
Bump minimum toolchain version
jfbastien Jan 31, 2019
d5dbe83
DeveloperPolicy: update toolchain with sample RFC / patch
jfbastien Jan 31, 2019
9a48438
[WebAssembly] Fix a regression selecting negative build_vector lanes
tlively Jan 31, 2019
e2dedd5
Revert "Bump minimum toolchain version"
jfbastien Jan 31, 2019
6f94a03
[libFuzzer][Windows] Temporarily disable value-profile-cmp2.test on Win
jonathanmetzman Jan 31, 2019
886b7cc
hwasan: Add __hwasan_init_static() function.
pcc Jan 31, 2019
50d6579
GlobalISel: Fix MMO creation with non-power-of-2 mem size
arsenm Jan 31, 2019
a78a44d
[sanitizer-coverage] prune trace-cmp instrumentation for CMP isntruct…
kcc Jan 31, 2019
ae667c4
[libFuzzer] make a test for exploding dfsan labels more agressive
kcc Jan 31, 2019
da45d68
[x86] add test for missed opportunity to use 'inc'; NFC
rotateright Jan 31, 2019
ef9a388
[x86] adjust test to show both add/inc options; NFC
rotateright Feb 1, 2019
9e67183
Revert "[Sema] Make canPassInRegisters return true if the CXXRecordDe…
ahatanaka Feb 1, 2019
6fa43f8
Mark __rela_iplt_{start,end} as weak.
pcc Feb 1, 2019
b6c6ab3
[analyzer] [RetainCountChecker] Fix object type for CF/Obj-C bridged …
Feb 1, 2019
dfbd190
Fix names of functions in TargetOptionsCommandFlags.h. NFC.
sbc100 Feb 1, 2019
b4744d3
[ELF] Support --{,no-}allow-shlib-undefined
MaskRay Feb 1, 2019
1368022
[opaque pointer types] Add a FunctionCallee wrapper type, and use it.
jyknight Feb 1, 2019
7cc0753
[WebAssembly] Support imports from custom module names
sbc100 Feb 1, 2019
b6c06dc
[Sanitizers] UBSan unreachable incompatible with ASan in the presence…
yln Feb 1, 2019
473e342
Fix compilation of examples after 13680223b9d8 / r352827
jyknight Feb 1, 2019
3aba9fd
[SemaCXX] Param diagnostic matches overload logic
modocache Feb 1, 2019
32b7738
[SelectionDAG] Support promotion of the FPOWI integer operand
asb Feb 1, 2019
7539fa2
[RISCV] Implement RV64D codegen
asb Feb 1, 2019
77074f9
Bump minimum toolchain version
jfbastien Feb 1, 2019
c6931dd
Revert "Bump minimum toolchain version"
jfbastien Feb 1, 2019
8a32f3b
[clangd] Fix crash in applyTweak, remove TweakID alias.
sam-mccall Feb 1, 2019
5ef88bd
Fix isInSystemMacro to handle pasted macros
Feb 1, 2019
4cdd783
[SLPVectorizer] Get rid of IndexQueue array from vectorizeStores. NFCI.
Feb 1, 2019
afe8a04
[obj2yaml] - Merge dumpRelSection and dumpRelaSection. NFC.
Feb 1, 2019
11f7969
[clangd] Fix -DBUILD_SHARED_LIBS=ON build - SwapIfBranches needs clan…
LebedevRI Feb 1, 2019
f3e00fe
Test commit: fix typo
smateo Feb 1, 2019
3440c33
[clangd] clangDaemonTweaks - fix -DBUILD_SHARED_LIBS=ON build
LebedevRI Feb 1, 2019
bac1151
[CodeGen] Don't scavenge non-saved regs in exception throwing functions
ostannard Feb 1, 2019
758657e
[PDB] Fix location retrieval for function local variables and argumen…
Feb 1, 2019
fb3ca13
[doc]Update String Error documentation in Programmer Manual
jh7370 Feb 1, 2019
563a29d
[llvm-symbolizer][test] Rename and tweak tests using llvm-symbolizer
jh7370 Feb 1, 2019
212833c
Revert r352750.
jh7370 Feb 1, 2019
15b17d0
Provide reason messages for unviable inlining
Feb 1, 2019
554644e
[clangd] Unbreak fuzzer target
sam-mccall Feb 1, 2019
2c15fc5
[PDB] Fix build after r352845
Feb 1, 2019
7857215
[X86][BdVer2] Transfer delays from the integer to the floating point …
LebedevRI Feb 1, 2019
d226bc8
Disable tidy checks with too many hits
ilya-biryukov Feb 1, 2019
b34fca6
[clangd] Use delimited style to make life easier for the fuzzer
sam-mccall Feb 1, 2019
866ba2c
[clangd] Implement textDocument/declaration from LSP 3.14
sam-mccall Feb 1, 2019
f4b19c0
[CUDA] Relax lit test condition after r352798.
Feb 1, 2019
b3ccc55
[AArch64] Optimize floating point materialization
zatrazz Feb 1, 2019
a4cf26b
[clangd] Penalize file-scope symbols in the ranking for non-completio…
sam-mccall Feb 1, 2019
d9e66e1
[CMake] Add install targets for utilities to LLVM exports if LLVM_INS…
weliveindetail Feb 1, 2019
be23a91
[InstCombine] try to reduce x86 addcarry to generic uaddo intrinsic
rotateright Feb 1, 2019
8495aab
[InstCombine] Fix -Wunused-variable when -DLLVM_ENABLE_ASSERTIONS=off
MaskRay Feb 1, 2019
4fb0a2c
[libclang] Fix -DBUILD_SHARED_LIBS=on build after rC352803
MaskRay Feb 1, 2019
fbcbac7
[InstCombine] reduce duplicate code; NFC
rotateright Feb 1, 2019
3186e3c
[clangd] Lib to compute and represent selection under cursor.
sam-mccall Feb 1, 2019
2048f22
[clangd] Lib to compute and represent selection under cursor.
sam-mccall Feb 1, 2019
9c8f432
[clangd] Expose SelectionTree to code tweaks, and use it for swap if …
sam-mccall Feb 1, 2019
971d476
[llvm-objcopy][NFC] Propagate errors in removeSymbols/removeSectionRe…
rupprecht Feb 1, 2019
05a3f99
[llvm-strip] Implement --keep-file-symbols
eleviant Feb 1, 2019
1a529f5
[X86][AVX] Combine INSERT_SUBVECTOR(SRC0, BITCAST(SHUFFLE(EXTRACT_SUB…
RKSimon Feb 1, 2019
0279b5b
[TargetLowering] try harder to determine undef elements of vector binops
rotateright Feb 1, 2019
f869996
[CMake] External compiler-rt-configure requires LLVMTestingSupport wh…
weliveindetail Feb 1, 2019
9fb113e
[AST][OpenMP] OpenMP Sections / Section constructs contain Structured…
LebedevRI Feb 1, 2019
8518401
[X86][SSE] Use PSLLDQ/PSRLDQ to mask out zeroable ends of a shuffle
RKSimon Feb 1, 2019
6502b14
[SDAG] improve variable names; NFC
rotateright Feb 1, 2019
fa3e4e5
[AMDGPU] Fix for vector element insertion
Feb 1, 2019
3724d15
[InstCombine] Refactor test checks (NFC)
Feb 1, 2019
94b9709
Fix some sphinx doc errors.
jyknight Feb 1, 2019
18886db
[llvm-objcopy][NFC] More error propagation (executeObjcopyOnArchive)
rupprecht Feb 1, 2019
58513b7
[DWARF v5] Fix DWARF emitter and consumer to produce/expect a uleb fo…
wolfy1961 Feb 1, 2019
1238838
Update SanitizerCoverage doc regarding the issue with pc-table and gc…
Dor1s Feb 1, 2019
68fad50
[llvm-nm] Report '.comment' ELF sections as 'n' instead of '?'
Feb 1, 2019
743ba66
[InstCombine] Expand Windows test (NFC)
Feb 1, 2019
186fcdb
gn build: Add a missing dependency from llvm/test to llvm-lit
nico Feb 1, 2019
5c65444
Fix the xcode build for r352845.
jimingham Feb 1, 2019
25b4c4c
[InstCombine] Refactor test checks (NFC)
Feb 1, 2019
50ca8ed
[llvm-readobj] Add a flag to dump just the section-to-segment mapping.
Feb 1, 2019
7f29195
test commit (add blank line) NFC
RolandF77 Feb 1, 2019
5503e4f
Fix a bug in the definition of isUnordered on MachineMemOperand
preames Feb 1, 2019
7ba2d3e
[lldb] Relax libc++ ABI version checking
tanderson-google Feb 1, 2019
5d9c8ad
[llvm-objdump] - llvm-objdump can skip bytes at the end of a section.
Feb 1, 2019
5c49a3f
Revert "Fix the xcode build for r352845."
weliveindetail Feb 1, 2019
da8fe66
Fix the xcode build for r352845, attempt #2
weliveindetail Feb 1, 2019
6e75c7e
Hopefully fix a couple more sphinx doc errors.
jyknight Feb 1, 2019
8b323f5
[InstCombine] Extra null-checking on TFE/LWE support
darkbuck Feb 1, 2019
6b653fc
[libc++] Disentangle the 3 implementations of type_info
ldionne Feb 1, 2019
251e148
[OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive.
Meinersbur Feb 1, 2019
a18761a
gn build: Create regular archives for the sanitizer runtimes.
pcc Feb 1, 2019
c456309
[InstCombine] Expand Windows test (NFC)
Feb 1, 2019
7976eb5
[opaque pointer types] Pass function types to CallInst creation.
jyknight Feb 1, 2019
d9e85a0
[opaque pointer types] Pass function types to InvokeInst creation.
jyknight Feb 1, 2019
14359ef
[opaque pointer types] Pass value type to LoadInst creation.
jyknight Feb 1, 2019
7716075
[opaque pointer types] Pass value type to GetElementPtr creation.
jyknight Feb 1, 2019
291f791
[opaque pointer types] Pass function type for CallBase::setCalledFunc…
jyknight Feb 1, 2019
835df27
[DebugInfo] Don't use realpath when looking up debug binary locations.
rupprecht Feb 1, 2019
d91776a
[InstCombine] Expand Windows test (NFC)
Feb 1, 2019
614dd19
[DebugInfo] Fix mkdir use in test
rupprecht Feb 1, 2019
de9ffab
Don't use ASTContext in DeclOpenMP.h because it's still incomplete.
EricWF Feb 1, 2019
afc24ed
[AMDGPU] Mark test functions with hidden visibility
scott-linder Feb 1, 2019
33706e3
[ubsan] Make suppressions.cpp test pass for me on Windows
rnk Feb 1, 2019
e95550f
[X86][AVX] Add VMOVDDUP-VPBROADCASTQ execution domain mapping
RKSimon Feb 1, 2019
70d484d
[COFF, ARM64] Fix localaddress to handle stack realignment and variab…
Feb 1, 2019
259e1bd
Factor out duplication between ExprIterator and ConstExprIterator.
zygoloid Feb 1, 2019
2e719bc
add a test and a couple minor bug fixes for the implicit-signed-integ…
mclow Feb 1, 2019
1147f71
Improve diagnostic to tell you a type is incomplete.
EricWF Feb 1, 2019
b2b0cab
[COFF] Fix crashes when writing a PDB after adding thunks.
mstorsjo Feb 1, 2019
c9f4d25
[COFF] Create range extension thunks for ARM64
mstorsjo Feb 1, 2019
cae8459
[WebAssembly] Add an import_field function attribute
Feb 1, 2019
f726e44
[WebAssembly] Add codegen support for the import_field attribute
Feb 1, 2019
05fc7ed
[Test] Update file w/update_test_checks.py to make a follow on change…
preames Feb 1, 2019
a21f342
Revert "[AST][OpenMP] OpenMP Sections / Section constructs contain St…
LebedevRI Feb 1, 2019
39ad187
[InstCombine] Refactor test checks (NFC)
Feb 1, 2019
b392ac9
[WebAssembly] Fix ImportName's position in this test.
Feb 1, 2019
00056ed
[CodeGen] Be as conservative about atomic accesses as for volatile
preames Feb 1, 2019
77b3530
[analyzer] Hotfix for RetainCountChecker: assert was too strong.
Feb 1, 2019
5233fb8
[BPF] [BTF] Process FileName with absolute path correctly
yonghong-song Feb 1, 2019
dc1e778
[AArch64] Fix unused variable [NFC]
Feb 1, 2019
329010e
Revert "[BPF] [BTF] Process FileName with absolute path correctly"
yonghong-song Feb 1, 2019
1bccafe
Handle cases where the dirent::d_type macros aren't defined
EricWF Feb 1, 2019
ae02943
[ELF] Default to --no-allow-shlib-undefined for executables
MaskRay Feb 2, 2019
d911ed1
[llvm-objcopy] Add ability to copy MachO object files
alexander-shaposhnikov Feb 2, 2019
2be4eab
[AutoUpgrade] Fix AutoUpgrade for x86.seh.recoverfp
Feb 2, 2019
916db65
Remove redundant FunctionDecl argument from a couple functions.
jyknight Feb 2, 2019
7d53675
[llvm-objcopy] Fix triples in macho tests.
alexander-shaposhnikov Feb 2, 2019
f82d892
[ASan] Do not instrument other runtime functions with `__asan_handle_…
yln Feb 2, 2019
a504897
[Sema][ObjC] Allow declaring ObjC pointer members with non-trivial
ahatanaka Feb 2, 2019
d078b4e
[llvm-objcopy] Temporarily limit one test to darwin
alexander-shaposhnikov Feb 2, 2019
c9a69ac
Bump minimum toolchain version
jfbastien Feb 2, 2019
fa36540
[BPF] [BTF] Process FileName with absolute path correctly
yonghong-song Feb 2, 2019
0dbab7f
[Clangd] textDocument/definition and textDocument/declaration "bounce…
sam-mccall Feb 2, 2019
115b64b
Revert "Bump minimum toolchain version"
jfbastien Feb 2, 2019
d3107a7
[X86][SSE]: Adding full coverage of MC encoding tests for the SSE isa…
topperc Feb 2, 2019
1be906a
[ASTImporter] Fix up test that only works on X86.
davemgreen Feb 2, 2019
44d6f9e
[clangd] Fix heap-use-after-free after r352868
Feb 2, 2019
509b48a
[LCSSA] Add expensive verification of LCSSA form for sub-loops.
fhahn Feb 2, 2019
ffe93a1
[analyzer][UninitializedObjectChecker] New flag to ignore guarded uni…
Szelethus Feb 2, 2019
dd2ef0a
[LCSSA] Handle case with single new PHI faster.
fhahn Feb 2, 2019
bd42f97
[SDAG] Add SDNode/SDValue getConstantOperandAPInt helper. NFCI.
RKSimon Feb 2, 2019
dbf302c
[X86][AVX] Enable INSERT_SUBVECTOR(SRC0, SHUFFLE(SRC1)) shuffle combi…
RKSimon Feb 2, 2019
e546b53
[clang-tidy] Rename time lookup functions; NFC
Feb 2, 2019
368c02e
[libunwind] Remove the remote unwinding support
petrhosek Feb 2, 2019
5745e90
[libunwind] Provide placement new definition
petrhosek Feb 2, 2019
cf07b09
[X86] Add another test case for PR40539. NFC
topperc Feb 2, 2019
b08a2d4
[clang-tidy] Make google-objc-function-naming ignore implicit functio…
stephanemoore Feb 2, 2019
0033112
Revert rCTE352968 due to compilation failures 💥
stephanemoore Feb 2, 2019
508da41
Move the feature test macros script to the utils directory.
EricWF Feb 2, 2019
c16cc77
Replace uses of %T with %t in from previous frontend test differential
nico Feb 2, 2019
e3f105c
[NewPM] Add support for new-PM plugins to clang
pfaffe Feb 2, 2019
cbaada6
GlobalISel: Legalization for inttoptr/ptrtoint
arsenm Feb 2, 2019
2491f82
AMDGPU/GlobalISel: Legalize select for pointer types
arsenm Feb 2, 2019
2065c94
AMDGPU/GlobalISel: Legalize constant for pointer types
arsenm Feb 2, 2019
58f9d3d
AMDGPU/GlobalISel: Legalize icmp for pointer types
arsenm Feb 2, 2019
eb2603c
AMDGPU/GlobalISel: Avoid reporting illegal extloads as legal
arsenm Feb 2, 2019
0e5d856
GlobalISel: Implement widenScalar for G_EXTRACT vector sources
arsenm Feb 2, 2019
888aa5d
GlobalISel: Implement widenScalar for G_UNMERGE_VALUES
arsenm Feb 3, 2019
24a2a48
Fix handling of usual deallocation functions in various configuratios.
EricWF Feb 3, 2019
aaa709f
[InstSimplify] Missed optimization in math expression: log10(pow(10.0…
Quolyk Feb 3, 2019
b21ed3c
[AMDGPU] Fix -Wunused-variable after rL352978
MaskRay Feb 3, 2019
365e164
Correct test my *really really* overaligning a type.
EricWF Feb 3, 2019
950ca19
[X86] Lower ISD::UADDO to use the Z flag instead of C flag when the R…
topperc Feb 3, 2019
5a570dd
[X86] Print %st(0) as %st to match what gcc inline asm uses as the cl…
topperc Feb 3, 2019
9438585
[DA][NewPM] Handle transitive dependencies in the new-pm version of DA
pfaffe Feb 3, 2019
359a973
[PowerPC] add tests for saturating add; NFC
rotateright Feb 3, 2019
00fcc74
[CGP] refactor optimizeCmpExpression (NFCI)
rotateright Feb 3, 2019
c493301
[AST] Extract ASTNodeTraverser class from ASTDumper
steveire Feb 3, 2019
e9a136b
Remove trailing semicolon. NFCI.
RKSimon Feb 3, 2019
22f538c
Remove trailing semicolon. NFCI.
RKSimon Feb 3, 2019
b961bd6
[CGP] move test file to prevent bot failures
rotateright Feb 3, 2019
3d6ecfc
[x86] add CGP uaddo test with weird type; NFC
rotateright Feb 3, 2019
a2a3e5b
[X86][AVX] More aggressively simplify BROADCAST source operand
RKSimon Feb 3, 2019
ccc4286
[objc-gnustep] Fix encoding of ivar size for _Bool.
Feb 3, 2019
4a0a64a
Hot fix two test regressions (%T vs %t)
davezarzycki Feb 3, 2019
18b73a6
[X86][AVX] Support shuffle combining for VPMOVZX with smaller vector …
RKSimon Feb 3, 2019
837552f
[PatternMatch] add special-case uaddo matching for increment-by-one (…
rotateright Feb 3, 2019
1fce5a8
[X86][AVX] Support shuffle combining for VBROADCAST with smaller vect…
RKSimon Feb 3, 2019
e2469b1
[libFuzzer][Windows] Reenable passing tests
jonathanmetzman Feb 3, 2019
84ceae6
[CGP] adjust target constraints for forming uaddo
rotateright Feb 3, 2019
f1314b6
[PowerPC] adjust test for uaddo change in rL353001
rotateright Feb 3, 2019
64bebe9
[ASTDump] Add a flag indicating whether a CXXThisExpr is implicit
riccibruno Feb 3, 2019
135413d
[NFC] Make vector types legal in UREM test
RKSimon Feb 3, 2019
e64aee8
[AST] Update the comments of the various Expr::Ignore* + Related clea…
riccibruno Feb 3, 2019
73929c4
[LoopIdiomRecognize] @llvm.dbg values shouldn't affect the transforma…
dcci Feb 3, 2019
1002ab3
[docs] Recommend assertions when testing.
dcci Feb 3, 2019
8799cae
[opaque pointer types] Trivial changes towards CallInst requiring
jyknight Feb 3, 2019
6ccad0a
Provide a placement new definition for the SEH version of UnwindCursor
mstorsjo Feb 3, 2019
b33b410
Compute the correct symbol size in llvm-nm even without --print-size
Feb 3, 2019
764727d
tests: loosen restriction
compnerd Feb 4, 2019
f77b858
Revert r352985 "[X86] Print %st(0) as %st to match what gcc inline as…
topperc Feb 4, 2019
145ccb0
[X86] Regenerate test to drop 'End function' comments some other othe…
topperc Feb 4, 2019
7a2944e
[X86] Print %st(0) as %st when its implicit to the instruction. Conti…
topperc Feb 4, 2019
b5e945c
Recommit r352660 "[X86] Mark EMMS and FEMMS as clobbering MM0-7 and S…
topperc Feb 4, 2019
437ee05
[SCEV] Do not bother creating separate SCEVUnknown for unreachable nodes
Feb 4, 2019
31df1ad
[OpenMP] Adding support to the mutexinoutset dep-type
smateo Feb 4, 2019
21193f4
[llvm-exegesis] Don't default to running&dumping all analyses to '-'
LebedevRI Feb 4, 2019
dc78bc2
[llvm-exegesis] deserializeMCInst(): bump SmallVector small size up t…
LebedevRI Feb 4, 2019
1a0d595
[llvm-exegesis] Throughput support in analysis mode
LebedevRI Feb 4, 2019
5b94fe9
[llvm-exegesis] Cut run time of analysis mode by -84% (*sic*) (YamlCo…
LebedevRI Feb 4, 2019
bd84b13
[llvm-exegesis] Cut run time of analysis mode by another -35% (*sic*)…
LebedevRI Feb 4, 2019
a1b0596
[clangd] Update vscode dependencies
hokein Feb 4, 2019
8e933c1
[clangd] Bump vscode-clangd v0.0.10
hokein Feb 4, 2019
1bb0e5c
[SelectionDAG] Add a BaseIndexOffset::print() method for debugging.
legrosbuffle Feb 4, 2019
9e012e8
[clang] Add getCommentHandler to PreambleCallbacks
kadircet Feb 4, 2019
65970aa
[NFC] Replace equivalent condition for better readability
Feb 4, 2019
20bef45
[clang-format] Fix breaking of qualified operator
krasimirgg Feb 4, 2019
13ab5cb
[NFC] Remove redundant parameters for better readability
Feb 4, 2019
be16b80
[llvm-objcopy][NFC] Fix trailing semicolon warning.
legrosbuffle Feb 4, 2019
09802f4
[NFC] Rename variables to reflect the actual status of GuardWidening
Feb 4, 2019
3643cbb
Commit tests for changes in revision D41608
Quolyk Feb 4, 2019
56b57e3
[NFC] Make a check in GuardWidening more obvious
Feb 4, 2019
d6c2d16
Merge remote-tracking branch 'origin/master' into intel.
vladimirlaz Feb 4, 2019
79d5bc9
Merge branch 'intel' into sycl
vladimirlaz Feb 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[WebAssembly] Add bulk memory target feature
Summary: Also clean up some preexisting target feature code.

Reviewers: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, jfb

Differential Revision: https://reviews.llvm.org/D57495

llvm-svn: 352793
  • Loading branch information
tlively committed Jan 31, 2019
commit 88058d4e1e05eb873c1df358e94d4e7608007ab6
2 changes: 2 additions & 0 deletions clang/include/clang/Driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -2155,6 +2155,8 @@ def msign_ext : Flag<["-"], "msign-ext">, Group<m_wasm_Features_Group>;
def mno_sign_ext : Flag<["-"], "mno-sign-ext">, Group<m_wasm_Features_Group>;
def mexception_handing : Flag<["-"], "mexception-handling">, Group<m_wasm_Features_Group>;
def mno_exception_handing : Flag<["-"], "mno-exception-handling">, Group<m_wasm_Features_Group>;
def mbulk_memory : Flag<["-"], "mbulk-memory">, Group<m_wasm_Features_Group>;
def mno_bulk_memory : Flag<["-"], "mno-bulk-memory">, Group<m_wasm_Features_Group>;

def mamdgpu_debugger_abi : Joined<["-"], "mamdgpu-debugger-abi=">,
Flags<[HelpHidden]>,
Expand Down
19 changes: 19 additions & 0 deletions clang/lib/Basic/Targets/WebAssembly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ bool WebAssemblyTargetInfo::hasFeature(StringRef Feature) const {
.Case("nontrapping-fptoint", HasNontrappingFPToInt)
.Case("sign-ext", HasSignExt)
.Case("exception-handling", HasExceptionHandling)
.Case("bulk-memory", HasBulkMemory)
.Default(false);
}

Expand All @@ -59,6 +60,14 @@ void WebAssemblyTargetInfo::getTargetDefines(const LangOptions &Opts,
Builder.defineMacro("__wasm_simd128__");
if (SIMDLevel >= UnimplementedSIMD128)
Builder.defineMacro("__wasm_unimplemented_simd128__");
if (HasNontrappingFPToInt)
Builder.defineMacro("__wasm_nontrapping_fptoint__");
if (HasSignExt)
Builder.defineMacro("__wasm_sign_ext__");
if (HasExceptionHandling)
Builder.defineMacro("__wasm_exception_handling__");
if (HasBulkMemory)
Builder.defineMacro("__wasm_bulk_memory__");
}

void WebAssemblyTargetInfo::setSIMDLevel(llvm::StringMap<bool> &Features,
Expand Down Expand Up @@ -93,6 +102,8 @@ bool WebAssemblyTargetInfo::initFeatureMap(
Features["sign-ext"] = true;
if (HasExceptionHandling)
Features["exception-handling"] = true;
if (HasBulkMemory)
Features["bulk-memory"] = true;

return TargetInfo::initFeatureMap(Features, Diags, CPU, FeaturesVec);
}
Expand Down Expand Up @@ -140,6 +151,14 @@ bool WebAssemblyTargetInfo::handleTargetFeatures(
HasExceptionHandling = false;
continue;
}
if (Feature == "+bulk-memory") {
HasBulkMemory = true;
continue;
}
if (Feature == "-bulk-memory") {
HasBulkMemory = false;
continue;
}

Diags.Report(diag::err_opt_not_valid_with_opt)
<< Feature << "-target-feature";
Expand Down
10 changes: 5 additions & 5 deletions clang/lib/Basic/Targets/WebAssembly.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ class LLVM_LIBRARY_VISIBILITY WebAssemblyTargetInfo : public TargetInfo {
UnimplementedSIMD128,
} SIMDLevel = NoSIMD;

bool HasNontrappingFPToInt;
bool HasSignExt;
bool HasExceptionHandling;
bool HasNontrappingFPToInt = false;
bool HasSignExt = false;
bool HasExceptionHandling = false;
bool HasBulkMemory = false;

public:
explicit WebAssemblyTargetInfo(const llvm::Triple &T, const TargetOptions &)
: TargetInfo(T), SIMDLevel(NoSIMD), HasNontrappingFPToInt(false),
HasSignExt(false), HasExceptionHandling(false) {
: TargetInfo(T) {
NoAsmVariants = true;
SuitableAlign = 128;
LargeArrayMinWidth = 128;
Expand Down
56 changes: 50 additions & 6 deletions clang/test/Preprocessor/wasm-target-features.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,72 @@
// SIMD128-UNIMPLEMENTED:#define __wasm_unimplemented_simd128__ 1{{$}}
//
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm32-unknown-unknown -mnontrapping-fptoint \
// RUN: | FileCheck %s -check-prefix=NONTRAPPING-FPTOINT
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm64-unknown-unknown -mnontrapping-fptoint \
// RUN: | FileCheck %s -check-prefix=NONTRAPPING-FPTOINT
//
// NONTRAPPING-FPTOINT:#define __wasm_nontrapping_fptoint__ 1{{$}}
//
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm32-unknown-unknown -msign-ext \
// RUN: | FileCheck %s -check-prefix=SIGN-EXT
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm64-unknown-unknown -msign-ext \
// RUN: | FileCheck %s -check-prefix=SIGN-EXT
//
// SIGN-EXT:#define __wasm_sign_ext__ 1{{$}}
//
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm32-unknown-unknown -mexception-handling \
// RUN: | FileCheck %s -check-prefix=EXCEPTION-HANDLING
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm64-unknown-unknown -mexception-handling \
// RUN: | FileCheck %s -check-prefix=EXCEPTION-HANDLING
//
// EXCEPTION-HANDLING:#define __wasm_exception_handling__ 1{{$}}
//
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm32-unknown-unknown -mbulk-memory \
// RUN: | FileCheck %s -check-prefix=BULK-MEMORY
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm64-unknown-unknown -mbulk-memory \
// RUN: | FileCheck %s -check-prefix=BULK-MEMORY
//
// BULK-MEMORY:#define __wasm_bulk_memory__ 1{{$}}
//
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm32-unknown-unknown -mcpu=mvp \
// RUN: | FileCheck %s -check-prefix=MVP
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm64-unknown-unknown -mcpu=mvp \
// RUN: | FileCheck %s -check-prefix=MVP
//
// MVP-NOT:#define __wasm_simd128__
// MVP-NOT:#define __wasm_unimplemented_simd128__
// MVP-NOT:#define __wasm_nontrapping_fptoint__
// MVP-NOT:#define __wasm_sign_ext__
// MVP-NOT:#define __wasm_exception_handling__
// MVP-NOT:#define __wasm_bulk_memory__
//
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm32-unknown-unknown -mcpu=bleeding-edge \
// RUN: | FileCheck %s -check-prefix=BLEEDING_EDGE
// RUN: | FileCheck %s -check-prefix=BLEEDING-EDGE
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm64-unknown-unknown -mcpu=bleeding-edge \
// RUN: | FileCheck %s -check-prefix=BLEEDING_EDGE
// RUN: | FileCheck %s -check-prefix=BLEEDING-EDGE
//
// BLEEDING_EDGE:#define __wasm_simd128__ 1{{$}}
// BLEEDING-EDGE:#define __wasm_nontrapping_fptoint__ 1{{$}}
// BLEEDING-EDGE:#define __wasm_sign_ext__ 1{{$}}
// BLEEDING-EDGE:#define __wasm_simd128__ 1{{$}}
// BLEEDING-EDGE-NOT:#define __wasm_unimplemented_simd128__ 1{{$}}
//
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm32-unknown-unknown -mcpu=bleeding-edge -mno-simd128 \
// RUN: | FileCheck %s -check-prefix=BLEEDING_EDGE_NO_SIMD128
// RUN: | FileCheck %s -check-prefix=BLEEDING-EDGE-NO-SIMD128
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm64-unknown-unknown -mcpu=bleeding-edge -mno-simd128 \
// RUN: | FileCheck %s -check-prefix=BLEEDING_EDGE_NO_SIMD128
// RUN: | FileCheck %s -check-prefix=BLEEDING-EDGE-NO-SIMD128
//
// BLEEDING_EDGE_NO_SIMD128-NOT:#define __wasm_simd128__
// BLEEDING-EDGE-NO-SIMD128-NOT:#define __wasm_simd128__
4 changes: 4 additions & 0 deletions llvm/lib/Target/WebAssembly/WebAssembly.td
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ def FeatureExceptionHandling :
SubtargetFeature<"exception-handling", "HasExceptionHandling", "true",
"Enable Wasm exception handling">;

def FeatureBulkMemory :
SubtargetFeature<"bulk-memory", "HasBulkMemory", "true",
"Enable bulk memory operations">;

//===----------------------------------------------------------------------===//
// Architectures.
//===----------------------------------------------------------------------===//
Expand Down
40 changes: 24 additions & 16 deletions llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,48 @@
//===----------------------------------------------------------------------===//

def HasAddr32 : Predicate<"!Subtarget->hasAddr64()">;

def HasAddr64 : Predicate<"Subtarget->hasAddr64()">;
def HasSIMD128 : Predicate<"Subtarget->hasSIMD128()">,
AssemblerPredicate<"FeatureSIMD128", "simd128">;

def HasSIMD128 :
Predicate<"Subtarget->hasSIMD128()">,
AssemblerPredicate<"FeatureSIMD128", "simd128">;

def HasUnimplementedSIMD128 :
Predicate<"Subtarget->hasUnimplementedSIMD128()">,
AssemblerPredicate<"FeatureUnimplementedSIMD128", "unimplemented-simd128">;
def HasAtomics : Predicate<"Subtarget->hasAtomics()">,
AssemblerPredicate<"FeatureAtomics", "atomics">;

def HasAtomics :
Predicate<"Subtarget->hasAtomics()">,
AssemblerPredicate<"FeatureAtomics", "atomics">;

def HasNontrappingFPToInt :
Predicate<"Subtarget->hasNontrappingFPToInt()">,
AssemblerPredicate<"FeatureNontrappingFPToInt",
"nontrapping-fptoint">;
AssemblerPredicate<"FeatureNontrappingFPToInt", "nontrapping-fptoint">;

def NotHasNontrappingFPToInt :
Predicate<"!Subtarget->hasNontrappingFPToInt()">,
AssemblerPredicate<"!FeatureNontrappingFPToInt",
"nontrapping-fptoint">;
AssemblerPredicate<"!FeatureNontrappingFPToInt", "nontrapping-fptoint">;

def HasSignExt :
Predicate<"Subtarget->hasSignExt()">,
AssemblerPredicate<"FeatureSignExt",
"sign-ext">;
AssemblerPredicate<"FeatureSignExt", "sign-ext">;

def NotHasSignExt :
Predicate<"!Subtarget->hasSignExt()">,
AssemblerPredicate<"!FeatureSignExt",
"sign-ext">;
AssemblerPredicate<"!FeatureSignExt", "sign-ext">;

def HasExceptionHandling :
Predicate<"Subtarget->hasExceptionHandling()">,
AssemblerPredicate<"FeatureExceptionHandling",
"exception-handling">;
AssemblerPredicate<"FeatureExceptionHandling", "exception-handling">;

def NotHasExceptionHandling :
Predicate<"!Subtarget->hasExceptionHandling()">,
AssemblerPredicate<"!FeatureExceptionHandling",
"exception-handling">;
AssemblerPredicate<"!FeatureExceptionHandling", "exception-handling">;

def HasBulkMemory :
Predicate<"Subtarget->hasBulkMemory()">,
AssemblerPredicate<"FeatureBulkMemory", "bulk-memory">;

//===----------------------------------------------------------------------===//
// WebAssembly-specific DAG Node Types.
Expand Down
2 changes: 2 additions & 0 deletions llvm/lib/Target/WebAssembly/WebAssemblySubtarget.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class WebAssemblySubtarget final : public WebAssemblyGenSubtargetInfo {
bool HasNontrappingFPToInt = false;
bool HasSignExt = false;
bool HasExceptionHandling = false;
bool HasBulkMemory = false;

/// String name of used CPU.
std::string CPUString;
Expand Down Expand Up @@ -89,6 +90,7 @@ class WebAssemblySubtarget final : public WebAssemblyGenSubtargetInfo {
bool hasNontrappingFPToInt() const { return HasNontrappingFPToInt; }
bool hasSignExt() const { return HasSignExt; }
bool hasExceptionHandling() const { return HasExceptionHandling; }
bool hasBulkMemory() const { return HasBulkMemory; }

/// Parses features string setting specified subtarget options. Definition of
/// function is auto generated by tblgen.
Expand Down
7 changes: 7 additions & 0 deletions llvm/test/CodeGen/WebAssembly/bulk-memory.ll
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mattr=+bulk-memory

; Test that basic bulk memory codegen works correctly
; TODO: implement basic bulk memory codegen

target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "wasm32-unknown-unknown"