summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix layering by moving Support/CodeGenCWrappers.h to TargetDavid Blaikie2018-03-233-5/+5
| | | | | | | | This includes llvm-c/TargetMachine.h which is logically part of libTarget (since libTarget implements llvm-c/TargetMachine.h's functions). llvm-svn: 328394
* Fix layering by moving X86DisassemblerDecoderCommon to SupportDavid Blaikie2018-03-234-4/+4
| | | | | | | | | This is used from llvm tblgen and the X86Disassembler - the only common library (apart from TableGen, which probably doesn't make sense to have as a dependency from a release tool (rather than a use-while-building-llvm tool) of LLVM) llvm-svn: 328393
* Move TargetLoweringObjectFile from CodeGen to Target to fix layeringDavid Blaikie2018-03-2338-38/+38
| | | | | | | It's implemented in Target & include from other Target headers, so the header should be in Target. llvm-svn: 328392
* Move a Repl access.Rafael Espindola2018-03-232-3/+2
| | | | | | | | Since SectionBase::getOutputSection handles ICF replaces and SectionBase::getOffset was handling it in some cases, it is more consistent to have getOffset always handle it. llvm-svn: 328391
* Drop redundant ->Repl.Rafael Espindola2018-03-231-1/+1
| | | | | | | SectionBase::getOutputSection handles replacement sections, so this code doesn't have to. llvm-svn: 328390
* Add support for __attribute__(trivial_abi).Jim Ingham2018-03-235-2/+150
| | | | | | <rdar://problem/36035075>, <rdar://problem/36035039> llvm-svn: 328389
* Partially Revert "Workaround GCC bug PR78489 - SFINAE order is not respected."Eric Fiselier2018-03-231-12/+17
| | | | | | | | | | This partially reverts commit r328261. The GCC bug has been fixed in trunk and has never existed in a released version. Therefore the changes to variant are unneeded. However, the additional tests have been left in place. llvm-svn: 328388
* [GuardWidening] Group code by class [NFC]Philip Reames2018-03-231-39/+40
| | | | llvm-svn: 328387
* [X86] Fix Windows `i1 zeroext` conventions to use i8 instead of i32Reid Kleckner2018-03-239-7/+91
| | | | | | | Both GCC and MSVC only look at the low byte of a boolean when it is passed. llvm-svn: 328386
* [HWASan] Port HWASan to Linux x86-64 (compiler-rt)Alex Shlyapnikov2018-03-236-43/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Porting HWASan to Linux x86-64, first of the three patches, compiler-rt part. The approach is similar to ARM case, trap signal is used to communicate memory tag check failure. int3 instruction is used to generate a signal, access parameters are stored in nop [eax + offset] instruction immediately following the int3 one Had to add HWASan init on malloc because, due to much less interceptors defined (most other sanitizers intercept much more and get initalized via one of those interceptors or don't care about malloc), HWASan was not initialized yet when libstdc++ was trying to allocate memory for its own fixed-size heap, which led to CHECK-fail in AllocateFromLocalPool. Also added the CHECK() failure handler with more detailed message and stack reporting. Reviewers: eugenis Subscribers: kubamracek, dberris, mgorny, kristof.beyls, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D44705 llvm-svn: 328385
* [libFuzzer] Use OptForFuzzing attribute with -fsanitize=fuzzer.Matt Morehouse2018-03-236-10/+19
| | | | | | | | | | | | | | | | | | | Summary: Disables certain CMP optimizations to improve fuzzing signal under -O1 and -O2. Switches all fuzzer tests to -O2 except for a few leak tests where the leak is optimized out under -O2. Reviewers: kcc, vitalybuka Reviewed By: vitalybuka Subscribers: cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D44798 llvm-svn: 328384
* Remove CommandObjectStats.cpp & CleanUpTest.cpp fromJason Molenda2018-03-231-2/+0
| | | | | | installing in the man page directory. llvm-svn: 328383
* Put CommandObjectStats.cpp in lldb-core target, remove CommandObjectStats.h ↵Jason Molenda2018-03-231-4/+4
| | | | | | from targets. llvm-svn: 328382
* Remove "FIXME" from a comment.Rui Ueyama2018-03-231-7/+6
| | | | | | A bug in BFD linker is not our FIXME item. llvm-svn: 328381
* Change for an LLVM header file moveDavid Blaikie2018-03-231-1/+1
| | | | llvm-svn: 328380
* Fix Layering, move instrumentation transform headers into Instrumentation ↵David Blaikie2018-03-239-11/+11
| | | | | | subdirectory llvm-svn: 328379
* [Commands] Add a (currently empty) `stats` command.Davide Italiano2018-03-235-0/+66
| | | | | | | | | | | | | This one will be used to print statistics about lldb sessions (including, e.g. number of expression evaluation succeeded or failed). I decided to commit the skeleton first so that we have a clean reference on how a command should be implemented. My future commits are going to populate this command and test it. <rdar://problem/36555975> llvm-svn: 328378
* [PM][FunctionAttrs] add NoUnwind attribute inference to ↵Fedor Sergeev2018-03-2332-97/+382
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PostOrderFunctionAttrs pass Summary: This was motivated by absence of PrunEH functionality in new PM. It was decided that a proper way to do PruneEH is to add NoUnwind inference into PostOrderFunctionAttrs and then perform normal SimplifyCFG on top. This change generalizes attribute handling implemented for (a removal of) Convergent attribute, by introducing a generic builder-like class AttributeInferer It registers all the attribute inference requests, storing per-attribute predicates into a vector, and then goes through an SCC Node, scanning all the instructions for not breaking attribute assumptions. The main idea is that as soon all the instructions from all the functions of SCC Node conform to attribute assumptions then we are free to infer the attribute as set for all the functions of SCC Node. It handles two distinct cases of attributes: - those that might break due to derefinement of the function code for these attributes we are allowed to apply inference only if all the functions are "exact definitions". Example - NoUnwind. - those that do not care about derefinement for these attributes we are allowed to apply inference as soon as we see any function definition. Example - removal of Convergent attribute. Also in this commit: * Converted all the FunctionAttrs tests to use FileCheck and added new-PM invocations to them * FunctionAttrs/convergent.ll test demonstrates a difference in behavior between new and old PM implementations. Marked with FIXME. * PruneEH tests were converted to new-PM as well, using function-attrs+simplify-cfg combo as intended * some of "other" tests were updated since function-attrs now infers 'nounwind' even for old PM pipeline * -disable-nounwind-inference hidden option added as a possible workaround for a supposedly rare case when nounwind being inferred by default presents a problem Reviewers: chandlerc, jlebar Reviewed By: jlebar Subscribers: eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D44415 llvm-svn: 328377
* FreeBSD sanitizer common, intercept couple of more functionsVitaly Buka2018-03-2310-13/+26
| | | | | | | | | | | | | | | Summary: Intercepts lstat, acct, access, faccessat and strlcpy/strlcat Patch by David CARLIER Reviewers: visa, vitalybuka Subscribers: krytarowski, fedor.sergeev, srhines, kubamracek, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D44432 llvm-svn: 328376
* Revert "Mmap interceptor providing mprotect support"Vitaly Buka2018-03-234-46/+8
| | | | | | | | Breaks Darwin. This reverts commit r328369. llvm-svn: 328375
* Change the darwin-debug target to build the standardJason Molenda2018-03-231-23/+8
| | | | | | archs. llvm-svn: 328374
* [CMakeLists] Update file list after recent changes.Davide Italiano2018-03-231-1/+0
| | | | llvm-svn: 328373
* [InstCombine] simplify code for FP intrinsic shrinking; NFCISanjay Patel2018-03-231-10/+5
| | | | llvm-svn: 328372
* [InstCombine] increase test coverage for intrinsic shrinking; NFCSanjay Patel2018-03-231-48/+48
| | | | | | There were no tests with vector types before this. llvm-svn: 328371
* [Commands] Remove dead code for unused `args` command.Davide Italiano2018-03-234-293/+0
| | | | | | | | | | It wasn't even registered. (lldb) apropos args No commands found pertaining to 'args'. Try 'help' to see a complete list of debugger commands. llvm-svn: 328370
* Mmap interceptor providing mprotect supportVitaly Buka2018-03-234-8/+46
| | | | | | | | | | | | | | | | | | Summary: - Intercepting mprotect calls. - Fixing forgotten flag check. Patch by David CARLIER Reviewers: vitalybuka, vsk Reviewed By: vitalybuka Subscribers: srhines, kubamracek, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D44777 llvm-svn: 328369
* [Command] Remove dead code for the syntax command.Davide Italiano2018-03-235-148/+0
| | | | | | | I'm going to add a new commend so I figured I could do some spring cleaning. llvm-svn: 328368
* [Hexagon] Make findLoopInstr member of HexagonInstrInfoKrzysztof Parzyszek2018-03-232-3/+11
| | | | llvm-svn: 328367
* [Hexagon] Correct update of instruction offet in HW loop fixupKrzysztof Parzyszek2018-03-231-3/+7
| | | | llvm-svn: 328366
* Log ObjC Runtime messages only in verbose modeAdrian Prantl2018-03-231-2/+2
| | | | llvm-svn: 328365
* [Hexagon] Boost profit for word-mask immediates, reduce for othersKrzysztof Parzyszek2018-03-233-10/+179
| | | | | | This avoids unnecessary splitting due to uninteresting immediates. llvm-svn: 328364
* [PDB] Resubmit "Support embedding natvis files in PDBs."Zachary Turner2018-03-2317-3/+531
| | | | | | | | | | | | This was reverted several times due to what ultimately turned out to be incompatibilities in our serialized hash table format. Several changes went in prior to this to fix those issues since they were more fundamental and independent of supporting injected sources, so now that those are fixed this change should hopefully pass. llvm-svn: 328363
* [CUDA] Fixed false error reporting in case of calling H->G->HD->D.Artem Belevich2018-03-232-3/+13
| | | | | | | | | | Launching a kernel from the host code does not generate code for the kernel itself. This fixes an issue with clang erroneously reporting an error for a HD->D call from within the kernel. Differential Revision: https://reviews.llvm.org/D44837 llvm-svn: 328362
* [HWASan] Port HWASan to Linux x86-64 (clang)Alex Shlyapnikov2018-03-236-47/+90
| | | | | | | | | | | | Summary: Porting HWASan to Linux x86-64, the third of the three patches, clang part. Reviewers: eugenis Subscribers: cryptoad, cfe-commits Differential Revision: https://reviews.llvm.org/D44745 llvm-svn: 328361
* [Hexagon] Assume all extendable branches to be of size 8 in relaxationKrzysztof Parzyszek2018-03-231-1/+8
| | | | | | | | | | | | | | The branch relaxation pass collects sizes of all instructions at the beginning, before any changes have been made. It then performs one pass over all branches to see which ones need to be extended. It does not account for the case when a previously valid branch becomes out-of-range due to relaxing other branches. This approach fixes this problem by assuming from the beginning that all extendable branches have been extended. This may cause unneeded relaxation in some cases, but avoids iteration and recomputing instruction sizes. llvm-svn: 328360
* [AMDGPU] Fix codegen for inline assemblyYaxun Liu2018-03-234-1/+27
| | | | | | | | Need to override convertConstraint to recognise amdgpu specific register names. Differential Revision: https://reviews.llvm.org/D44533 llvm-svn: 328359
* [llvm-mca] Split the InstructionInfoView from the SummaryView.Andrea Di Biagio2018-03-236-106/+155
| | | | llvm-svn: 328358
* [Hexagon] Incorrectly removing dead flag and adding kill flagKrzysztof Parzyszek2018-03-231-3/+4
| | | | | | | | | | | | The HexagonExpandCondsets pass is incorrectly removing the dead flag on a definition that is really dead, and adding a kill flag to a use that is tied to a definition. This causes an assert later during the machine scheduler when querying the live interval information. Patch by Brendon Cahoon. llvm-svn: 328357
* [Hexagon] Silence unused variable warning in Release buildsBenjamin Kramer2018-03-231-2/+2
| | | | llvm-svn: 328356
* [Hexagon] Fold offset in base+immediate loads/storesKrzysztof Parzyszek2018-03-232-9/+238
| | | | | | | | Optimize Ry = add(Rx,#n); memw(Ry+#0) = Rz => memw(Rx,#n) = Rz. Patch by Jyotsna Verma. llvm-svn: 328355
* Fix misuse of llvm::YAML in clangd test.Jordan Rose2018-03-231-1/+1
| | | | | | Caught by LLVM r328345! llvm-svn: 328354
* [X86] Add itinerary to RCPSS*_Int and similar instructions.Craig Topper2018-03-231-2/+2
| | | | llvm-svn: 328353
* [X86] Add itineraries to ADD.*_DB instructions to match their normal ↵Craig Topper2018-03-231-11/+20
| | | | | | counterparts. llvm-svn: 328352
* [AMDGPU] Update OpenCL to use 48 bytes of implicit arguments for AMDGPUTony Tye2018-03-233-11/+15
| | | | | | | | Add two additional implicit arguments for OpenCL for the AMDGPU target using the AMDHSA runtime to support device enqueue. Differential Revision: https://reviews.llvm.org/D44697 llvm-svn: 328351
* [AMDGPU] Update OpenCL to use 48 bytes of implicit arguments for AMDGPU (CLANG)Tony Tye2018-03-232-26/+26
| | | | | | | | Add two additional implicit arguments for OpenCL for the AMDGPU target using the AMDHSA runtime to support device enqueue. Differential Revision: https://reviews.llvm.org/D44696 llvm-svn: 328350
* [AMDGPU] Remove use of OpenCL triple environment and replace with function ↵Tony Tye2018-03-237-55/+159
| | | | | | | | | | | attribute for AMDGPU - Remove use of the opencl and amdopencl environment member of the target triple for the AMDGPU target. - Use function attribute to communicate to the AMDGPU backend to add implicit arguments for OpenCL kernels for the AMDHSA OS. Differential Revision: https://reviews.llvm.org/D43736 llvm-svn: 328349
* [PDB] Make our PDBs look more like MS PDBs.Zachary Turner2018-03-2322-303/+267
| | | | | | | | | | | | | | | | | | When investigating bugs in PDB generation, the first step is often to do the same link with link.exe and then compare PDBs. But comparing PDBs is hard because two completely different byte sequences can both be correct, so it hampers the investigation when you also have to spend time figuring out not just which bytes are different, but also if the difference is meaningful. This patch fixes a couple of cases related to string table emission, hash table emission, and the order in which we emit strings that makes more of our bytes the same as the bytes generated by MS PDBs. Differential Revision: https://reviews.llvm.org/D44810 llvm-svn: 328348
* [AMDGPU] Remove use of OpenCL triple environment and replace with function ↵Tony Tye2018-03-233-28/+42
| | | | | | | | | | | attribute for AMDGPU (CLANG) - Remove use of the opencl and amdopencl environment member of the target triple for the AMDGPU target. - Use a function attribute to communicate to the AMDGPU backend. Differential Revision: https://reviews.llvm.org/D43735 llvm-svn: 328347
* [Hexagon] Always generate mux out of predicated transfers if possibleKrzysztof Parzyszek2018-03-238-9/+77
| | | | | | | | | | | | HexagonGenMux would collapse pairs of predicated transfers if it assumed that the predicated .new forms cannot be created. Turns out that generating mux is preferable in almost all cases. Introduce an option -hexagon-gen-mux-threshold that controls the minimum distance between the instruction defining the predicate and the later of the two transfers. If the distance is closer than the threshold, mux will not be generated. Set the threshold to 0 by default. llvm-svn: 328346
* Delete the copy constructor for llvm::yaml::NodeJordan Rose2018-03-231-0/+5
| | | | | | | | | | | | The nodes keep a reference back to the original document, but the document is streamed, not read all into memory at once, and the position is part of the state. If nodes are ever copied, the document position can end up being advanced more than once. This did not reveal any problems in LLVM or Clang but caught a handful over in Swift! llvm-svn: 328345
OpenPOWER on IntegriCloud