summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use /pdbaltpath to avoid a path length dependency.Peter Collingbourne2018-04-201-3/+3
| | | | llvm-svn: 330485
* COFF: Merge .xdata into .rdata by default.Peter Collingbourne2018-04-204-28/+25
| | | | | | Differential Revision: https://reviews.llvm.org/D45804 llvm-svn: 330484
* COFF: Merge .bss into .data by default.Peter Collingbourne2018-04-206-41/+14
| | | | | | Differential Revision: https://reviews.llvm.org/D45803 llvm-svn: 330483
* Add -z {combreloc,copyreloc,noexecstack,lazy,relro,text}.Rui Ueyama2018-04-208-12/+45
| | | | | | Differential Revision: https://reviews.llvm.org/D45902 llvm-svn: 330482
* COFF: Preserve section type when processing /section flag.Peter Collingbourne2018-04-205-5/+15
| | | | | | | | It turns out that we were dropping this before. Differential Revision: https://reviews.llvm.org/D45802 llvm-svn: 330481
* [X86] Add WriteFSign/WriteFLogic scheduler classesSimon Pilgrim2018-04-2018-1163/+910
| | | | | | | | | | | | | | Split the fp and integer vector logical instruction scheduler classes - older CPUs especially often handled these on different pipes. This unearthed a couple of things that are also handled in this patch: (1) We were tagging avx512 fp logic ops as WriteFAdd, probably because of the lack of WriteFLogic (2) SandyBridge had integer logic ops only using Port5, when afaict they can use Ports015. (3) Cleaned up x86 FCHS/FABS scheduling as they are typically treated as fp logic ops. Differential Revision: https://reviews.llvm.org/D45629 llvm-svn: 330480
* COFF: Use (name, output characteristics) as a key when grouping input ↵Peter Collingbourne2018-04-206-31/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sections into output sections. This is what link.exe does and lets us avoid needing to worry about merging output characteristics while adding input sections to output sections. With this change we can't process /merge in the same way as before because sections with different output characteristics can still be merged into one another. So this change moves the processing of /merge to just before we assign addresses. In the case where there are multiple output sections with the same name, link.exe only merges the first section with the source name into the first section with the target name, and we do the same. At the same time I also implemented transitive merging (which means that /merge:.c=.b /merge:.b=.a merges both .c and .b into .a). This isn't quite enough though because link.exe has a special case for .CRT in 32-bit mode: it processes sections whose output characteristics are DATA | R | W as though the output characteristics were DATA | R (so that they get merged into things like constructor lists in the expected way). Chromium has a few such sections, and it turns out that those sections were causing the problem that resulted in r318699 (merge .xdata into .rdata) being reverted: because of the previous permission merging semantics, the .CRT sections were causing the entire .rdata section to become writable, which caused the SEH runtime to crash because it apparently requires .xdata to be read-only. This change also implements the same special case. This should unblock being able to merge .xdata into .rdata by default, as well as .bss into .data, both of which will be done in followups. Differential Revision: https://reviews.llvm.org/D45801 llvm-svn: 330479
* [llvm-objcopy] Fix sh_linkAlexander Shaposhnikov2018-04-204-35/+69
| | | | | | | | | | | | This diff fixes sh_link for various types of sections (i.e. for SHT_ARM_EXIDX, SHT_HASH). In particular, this change enables us to use llvm-objcopy with clang -gsplit-dwarf for the target android-arm. Test plan: make check-all Differential revision: https://reviews.llvm.org/D45851 llvm-svn: 330478
* [OpenMP] Make bc file compilation sensitive to LIBOMPTARGET_NVPTX_DEBUG flagGuansong Zhang2018-04-201-1/+7
| | | | | | | | | | | | | | Summary: The LIBOMPTARGET_NVPTX_DEBUG flag is inconsistent between using nvcc to generate .a file and clang to generate .bc file. Sync the two setting so we can get debug messages from the bc file path as well. Reviewers: grokos Subscribers: Hahnfeld, openmp-commits, mgorny Tags: #openmp Differential Revision: https://reviews.llvm.org/D45530 llvm-svn: 330477
* Revert "[Sanitizer] Internal Printf string precision argument + padding."Alex Shlyapnikov2018-04-202-9/+2
| | | | | | | | | This reverts commit r330458. There are existing code using string precision as 'max len', need more work. llvm-svn: 330476
* [HWASan] Introduce non-zero based and dynamic shadow memory (LLVM).Alex Shlyapnikov2018-04-203-43/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Support the dynamic shadow memory offset (the default case for user space now) and static non-zero shadow memory offset (-hwasan-mapping-offset option). Keeping the the latter case around for functionality and performance comparison tests (and mostly for -hwasan-mapping-offset=0 case). The implementation is stripped down ASan one, picking only the relevant parts in the following assumptions: shadow scale is fixed, the shadow memory is dynamic, it is accessed via ifunc global, shadow memory address rematerialization is suppressed. Keep zero-based shadow memory for kernel (-hwasan-kernel option) and calls instreumented case (-hwasan-instrument-with-calls option), which essentially means that the generated code is not changed in these cases. Reviewers: eugenis Subscribers: srhines, llvm-commits Differential Revision: https://reviews.llvm.org/D45840 llvm-svn: 330475
* [HWASan] Introduce non-zero based and dynamic shadow memory (compiler-rt).Alex Shlyapnikov2018-04-2013-70/+409
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Retire the fixed shadow memory mapping to avoid conflicts with default process memory mapping (currently manifests on Android). Tests on AArch64 show <1% performance loss and code size increase, making it possible to use dynamic shadow memory by default. For the simplicity and unifirmity sake, use dynamic shadow memory mapping with base address accessed via ifunc resolver on all supported platforms. Keep the fixed shadow memory mapping around to be able to run performance comparison tests later. Complementing D45840. Reviewers: eugenis Subscribers: srhines, kubamracek, dberris, mgorny, kristof.beyls, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D45847 llvm-svn: 330474
* [PartialInlining] Fix Crash from holding a reference to a destructed ORE.Sean Fertile2018-04-202-37/+190
| | | | | | | | | | | | | The callback used to create an ORE for the legacy PI pass caches the allocated object in a unique_ptr in the runOnModule function, and returns a reference to that object. Under certian circumstances we can end up holding onto that reference after the OREs destruction. Rather then allowing the new and legacy passes to create ORE object in diffrent ways, create the ORE at the point of use. Differential Revision: https://reviews.llvm.org/D43219 llvm-svn: 330473
* [Hexagon] hexagon-autohvx was left on againKrzysztof Parzyszek2018-04-201-1/+1
| | | | llvm-svn: 330472
* [Hexagon] Improve HVX instruction selection (bitcast, vsplat)Krzysztof Parzyszek2018-04-2010-71/+169
| | | | | | | | | | There was some unfortunate interaction between VSPLAT and BITCAST related to the selection of constant vectors (coming from selecting shuffles). Introduce VSPLATW that always splats a 32-bit word, and can have arbitrary result type (to avoid BITCASTs of VSPLAT). Clean up the previous selection of BITCAST/VSPLAT. llvm-svn: 330471
* Remove unused argument from emitModuleMetadata.Eric Christopher2018-04-204-15/+11
| | | | | | NFCI. llvm-svn: 330470
* asan: Mark printf-4.c as unsupported on Windows.Peter Collingbourne2018-04-201-2/+3
| | | | | | | | | Although sprintf is not intercepted on Windows, this test can pass if sprintf calls memmove, which is intercepted, so we can't XFAIL it. Differential Revision: https://reviews.llvm.org/D45894 llvm-svn: 330469
* [Hexagon] Skip fixed-stack indexes in HexagonConstExtendersKrzysztof Parzyszek2018-04-202-0/+58
| | | | | | | Fixed slots have negative values, and TRI::stackSlot2Index and TRI::index2StackSlot do not handle negative numbers. llvm-svn: 330468
* [isl++] abort() on assertion violation.Michael Kruse2018-04-201-0/+1
| | | | | | | | | | | | | | | | Before this patch, ISL_ASSERT only printed an error message to stderr. This can be easily missed if the program continues or just fails later. To fail-early and help error diagnostics (e.g. using bugpoint), call abort() when an assertion does not hold. I seem to just have forgotten to add this abort() when I originally proposed the ISL_ASSERT macro. Suggested-By: Eli Friedman <efriedma@codeaurora.org> Differential Revision: https://reviews.llvm.org/D45171 llvm-svn: 330467
* Allow arbitrary function calls for debugging purposes.Michael Kruse2018-04-206-1/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the switch -polly-debug-func to define the name of a debug function. This function is ignored for any validity check. Its purpose is to allow to observe a value after transformation by a SCoP, and to follow which statements are executed in which order. For instance, consider the following code: static void dbg_printf(int sum, int i) { fprintf(stderr, "The value of sum is %d, i=%d\n", sum, i); fflush(stderr); } void func(int n) { int sum = 0; for (int i = 0; i < 16; i+=1) { sum += i; dbg_printf(sum, i); } } Executing this after Polly's codegen with -polly-debug-func=dbg_printf reveals the new execution order and the assumed values at that point of execution. Differential Revision: https://reviews.llvm.org/D45728 llvm-svn: 330466
* [X86][SandyBridge] Remove duplciate InstRWs from Sandy Brige scheduler model.Craig Topper2018-04-201-60/+6
| | | | llvm-svn: 330465
* Under some scenarios, the current directory isn't writableSterling Augustine2018-04-201-1/+1
| | | | | | during a test. Set the output path to avoid that problem. llvm-svn: 330464
* [X86] WaitPKG intrinsicsGabor Buella2018-04-2011-0/+109
| | | | | | | | | | Reviewers: craig.topper, zvi Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D45254 llvm-svn: 330463
* [X86] WaitPKG instructionsGabor Buella2018-04-2017-13/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Three new instructions: umonitor - Sets up a linear address range to be monitored by hardware and activates the monitor. The address range should be a writeback memory caching type. umwait - A hint that allows the processor to stop instruction execution and enter an implementation-dependent optimized state until occurrence of a class of events. tpause - Directs the processor to enter an implementation-dependent optimized state until the TSC reaches the value in EDX:EAX. Also modifying the description of the mfence instruction, as the rep prefix (0xF3) was allowed before, which would conflict with umonitor during disassembly. Before: $ echo 0xf3,0x0f,0xae,0xf0 | llvm-mc -disassemble .text mfence After: $ echo 0xf3,0x0f,0xae,0xf0 | llvm-mc -disassemble .text umonitor %rax Reviewers: craig.topper, zvi Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D45253 llvm-svn: 330462
* [LLD/PDB] Remove improper assert.Zachary Turner2018-04-201-1/+0
| | | | | | | | It's possible to have an empty object file, for example if you just compile an empty .c file. This file won't have any sections so asserting that a file has chunks is definitely wrong. llvm-svn: 330461
* Fix the Xcode gtest target for the move of FileSpecTest.cpp.Jim Ingham2018-04-201-1/+1
| | | | llvm-svn: 330460
* [MachineOutliner] Change B instruction for tail calls to TCRETURNdiJessica Paquette2018-04-202-4/+5
| | | | | | | | | | First off, this is more correct than having the B. Second off, this was making a bot upset. This fixes that. Update the test to include -verify-machineinstrs as well to prevent stuff like this slipping by non debug/assert builds in the future. llvm-svn: 330459
* [Sanitizer] Internal Printf string precision argument + padding.Alex Shlyapnikov2018-04-202-2/+9
| | | | | | | | | | | | | | | | | | | | | | Summary: Example: Printf("%.*s", 5, "123"); should yield: '123 ' In case Printf's requested string precision is larger than the string argument, the resulting string should be padded up to the requested precision. For the simplicity sake, implementing right padding only. Reviewers: eugenis Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D45844 llvm-svn: 330458
* [LLD/PDB] Emit first section contribution for DBI Module Descriptor.Zachary Turner2018-04-204-34/+55
| | | | | | | | | | | | | | | | Part of the DBI stream is a list of variable length structures describing each module that contributes to the final executable. One member of this structure is a section contribution entry that describes the first section contribution in the output file for the given module. We have been leaving this structure unpopulated until now, so with this patch it is now filled out correctly. Differential Revision: https://reviews.llvm.org/D45832 llvm-svn: 330457
* [WebAssembly] Implement -print-gc-sections, to better test GC of globalsNicholas Wilson2018-04-206-14/+137
| | | | | | Differential Revision: https://reviews.llvm.org/D44311 llvm-svn: 330456
* Remove llvm-build's --configure-target-def-file.Nico Weber2018-04-202-114/+1
| | | | | | | | | | It was added 6.5 years ago in r144345, but was never hooked up and has been unused since. If _you_ do use this, feel free to revert, but add a comment on where it's used. https://reviews.llvm.org/D45262 llvm-svn: 330455
* [WebAssembly] Implement GC for importsNicholas Wilson2018-04-206-17/+187
| | | | | | Differential Revision: https://reviews.llvm.org/D44313 llvm-svn: 330454
* [utils] improve AArch64 asm parserSanjay Patel2018-04-201-1/+1
| | | | | | | | If we don't mark the cfi line as optional, the script won't work with 'nounwind' code. Without that attr, there may be extra noise in the asm body that we don't want to see. llvm-svn: 330453
* Record whether a module came from a private module mapJordan Rose2018-04-205-6/+20
| | | | | | | | | | | Right now we only use this information in one place, immediately after we calculate it, but it's still nice information to have. The Swift project is going to use this to tidy up its "API notes" feature (see past discussion on cfe-dev that never quite converged). Reviewed by Bruno Cardoso Lopes. llvm-svn: 330452
* Revert r330442, CodeGen/no-ident-version.c is failing on PPCMikhail Maltsev2018-04-207-33/+3
| | | | llvm-svn: 330451
* Fix a crash when resolving overloads of C++ virtual methods.Adrian Prantl2018-04-204-1/+29
| | | | | | | | | The isOverload() method needs to account for situations where the two methods being compared don't have the same number of arguments. rdar://problem/39542960 llvm-svn: 330450
* [WebAssembly] Implement --print-gc-sections for synthetic functionsNicholas Wilson2018-04-205-9/+27
| | | | | | | | | | Enables cleaning up confusion between which name variables are mangled and which are unmangled, and --print-gc-sections then excersises and tests that. Differential Revision: https://reviews.llvm.org/D44440 llvm-svn: 330449
* [WebAssembly] Distinguish debug/symbol names in the Wasm structs. NFCNicholas Wilson2018-04-202-19/+11
| | | | | | Differential Revision: https://reviews.llvm.org/D45021 llvm-svn: 330448
* [CUDA] Set LLVM calling convention for CUDA kernelYaxun Liu2018-04-204-0/+52
| | | | | | | | | | | | | | Some targets need special LLVM calling convention for CUDA kernel. This patch does that through a TargetCodeGenInfo hook. It only affects amdgcn target. Patch by Greg Rodgers. Revised and lit tests added by Yaxun Liu. Differential Revision: https://reviews.llvm.org/D45223 llvm-svn: 330447
* Revert r330431.Michael Zolotukhin2018-04-201-30/+26
| | | | | | There are still stage3/stage4 miscompares :( llvm-svn: 330446
* [x86] auto-generate checks; NFCSanjay Patel2018-04-201-213/+411
| | | | | | | There's a proposal to change/add to this file in D45653, so we should know exactly what those differences would be. llvm-svn: 330445
* [NewGVN] Split OpPHI detection and creation.Florian Hahn2018-04-202-103/+168
| | | | | | | | | | | | | It also adds a check making sure PHIs for operands are all in the same block. Patch by Daniel Berlin <dberlin@dberlin.org> Reviewers: dberlin, davide Differential Revision: https://reviews.llvm.org/D43865 llvm-svn: 330444
* [ELF] --warn-backrefs: use the same GroupId for object files in the same ↵Fangrui Song2018-04-204-3/+25
| | | | | | | | | | | | --{start,end}-lib Reviewers: ruiu, espindola Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D45849 llvm-svn: 330443
* [CodeGen] Add an option to suppress output of llvm.identMikhail Maltsev2018-04-207-3/+33
| | | | | | | | | | | | | | | | | | | | | | Summary: By default Clang outputs its version (including git commit hash, in case of trunk builds) into object and assembly files. It might be useful to have an option to disable this, especially for debugging purposes. This patch implements new command line flags -Qn and -Qy (the names are chosen for compatibility with GCC). -Qn disables output of the 'llvm.ident' metadata string and the 'producer' debug info. -Qy (enabled by default) does the opposite. Reviewers: faisalv, echristo, aprantl Reviewed By: aprantl Subscribers: aprantl, cfe-commits, JDevlieghere, rogfer01 Differential Revision: https://reviews.llvm.org/D45255 llvm-svn: 330442
* Fix some tests that were failing on WindowsHans Wennborg2018-04-203-9/+9
| | | | llvm-svn: 330441
* [DebugInfo] Use WithColor for more debug line warningsAndrew Ng2018-04-203-8/+10
| | | | | | | | | | Updated two more debug line related warnings to use WithColor. This was necessary to ensure consistent output order of the warnings on Windows for debug line tests. Differential Revision: https://reviews.llvm.org/D45871 llvm-svn: 330440
* [CostModel][X86] Add vector element insert/extract cost testsSimon Pilgrim2018-04-202-0/+718
| | | | llvm-svn: 330439
* Fix test by allowing it to accept an upper or lower case letter as the first ↵Douglas Yung2018-04-201-1/+1
| | | | | | | | character. Windows for some reason uses a lower case letter, while linux uses upper case. llvm-svn: 330438
* [DAGCombine] (float)((int) f) --> ftrunc (PR36617)Sanjay Patel2018-04-2011-331/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was originally committed at rL328921 and reverted at rL329920 to investigate failures in Chrome. This time I've added to the ReleaseNotes to warn users of the potential of exposing UB and let me repeat that here for more exposure: Optimization of floating-point casts is improved. This may cause surprising results for code that is relying on undefined behavior. Code sanitizers can be used to detect affected patterns such as this: int main() { float x = 4294967296.0f; x = (float)((int)x); printf("junk in the ftrunc: %f\n", x); return 0; } $ clang -O1 ftrunc.c -fsanitize=undefined ; ./a.out ftrunc.c:5:15: runtime error: 4.29497e+09 is outside the range of representable values of type 'int' junk in the ftrunc: 0.000000 Original commit message: fptosi / fptoui round towards zero, and that's the same behavior as ISD::FTRUNC, so replace a pair of casts with the equivalent node. We don't have to account for special cases (NaN, INF) because out-of-range casts are undefined. Differential Revision: https://reviews.llvm.org/D44909 llvm-svn: 330437
* [CostModel][X86] Add srem/urem constant cost testsSimon Pilgrim2018-04-201-0/+248
| | | | llvm-svn: 330436
OpenPOWER on IntegriCloud