summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add missing dependency to Hexagon target.Diego Novillo2015-07-081-0/+1
| | | | | | | A recent patch added calls to isInstructionTriviallyDead without the corresponding dependency on TransformUtils. llvm-svn: 241731
* Use a raw_svector_ostream and simplify a loop. NFC.Rafael Espindola2015-07-081-6/+3
| | | | llvm-svn: 241727
* [Win64] Only treat some functions as having the Win64 conventionReid Kleckner2015-07-081-2/+20
| | | | | | | | | | | | | | | | All the usual X86 target-specific conventions are collapsed to the normal Win64 convention, but the custom conventions like GHC and webkit should not be. Previously we would assume that the caller allocated 32 bytes of shadow space for us, which is not how webkit_jscc or other custom conventions are supposed to work. Based on a patch by peavo@outlook.com. Fixes PR24051. llvm-svn: 241725
* Start adding support for writing archives in BSD format.Rafael Espindola2015-07-082-12/+34
| | | | | | | | No support for the symbol table yet (but will hopefully add it today). We always use the long filename format so that we can align the member, which is an advantage of the BSD format. llvm-svn: 241721
* MIR Parser: Use source locations for MBB naming errors.Alex Lorenz2015-07-082-6/+20
| | | | | | | | | This commit changes the type of the field 'Name' in the struct 'yaml::MachineBasicBlock' from 'std::string' to 'yaml::StringValue'. This change allows the MIR parser to report errors related to the MBB name with the proper source locations. llvm-svn: 241718
* early exits -> less indenting; NFCISanjay Patel2015-07-081-23/+22
| | | | llvm-svn: 241716
* [Hexagon] Implement commoning of GetElementPtr instructionsKrzysztof Parzyszek2015-07-083-0/+1340
| | | | llvm-svn: 241714
* LibDriver: Fix output path inference.Peter Collingbourne2015-07-081-11/+7
| | | | | | | | | The inferred output file name is based on the first input file, not the first one with extension .obj. The output file was also being written to the wrong directory; it needs to be written to whichever directory on the libpath it was found in. This change fixes both issues. llvm-svn: 241710
* [LAA] Add missing debug output after r239285Adam Nemet2015-07-081-1/+3
| | | | | | | | | r239285 ([LoopAccessAnalysis] Teach LAA to check the memory dependence between strided accesses.) introduced a new case under MemoryDepChecker::isDependent. We normally have debug output for each case. llvm-svn: 241707
* [SEH] Ensure that empty __except blocks have their own BBReid Kleckner2015-07-082-3/+8
| | | | | | | | | The 32-bit lowering assumed that WinEHPrepare had this invariant. WinEHPrepare did it for C++, but not SEH. The result was that we would insert calls to llvm.x86.seh.restoreframe in normal basic blocks, which corrupted the frame pointer. llvm-svn: 241699
* MC: Constify MCSubtargetInfo in getDeprecationInfo(), NFCDuncan P. N. Exon Smith2015-07-082-5/+5
| | | | | | | There's no reason to be able to mutate `MCSubtargetInfo` in `getDeprecationInfo()`. Constify the reference. llvm-svn: 241693
* Inline function into only use.Rafael Espindola2015-07-081-12/+6
| | | | llvm-svn: 241692
* Add a helper function to reduce a bit of code duplication.Rafael Espindola2015-07-081-25/+22
| | | | llvm-svn: 241691
* Cosmetic cleanups - NFCEli Bendersky2015-07-082-6/+3
| | | | | | Remove commented lines, trailing whitespace, etc. llvm-svn: 241687
* [SPARC] Cleanup handling of the Y/ASR registers.James Y Knight2015-07-084-13/+22
| | | | | | | | | | | | | | | | | | - Implement copying ASR to/from GPR regs. - Mark ASRs as non-allocatable, so it won't try to arbitrarily use them inappropriately. - Instead of inserting explicit WRASR/RDASR nodes in the MUL/DIV routines, just do normal register copies. - Also...mark div as using Y, not just writing it. Added a test case with some code which previously died with an assertion failure (with -O0), or produced wrong code (otherwise). (Third time's the charm?) Differential Revision: http://reviews.llvm.org/D10401 llvm-svn: 241686
* Use a range loop. NFC.Rafael Espindola2015-07-081-8/+6
| | | | llvm-svn: 241685
* [Hexagon] Generate "insert" instructions more aggressivelyKrzysztof Parzyszek2015-07-083-1/+1604
| | | | llvm-svn: 241683
* Revert 241681: causes Windows builds to failKrzysztof Parzyszek2015-07-083-1604/+1
| | | | llvm-svn: 241682
* [Hexagon] Generate "insert" instructions more aggressivelyKrzysztof Parzyszek2015-07-083-1/+1604
| | | | llvm-svn: 241681
* [LAA] Merge memchecks for accesses separated by a constant offsetSilviu Baranga2015-07-081-38/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Often filter-like loops will do memory accesses that are separated by constant offsets. In these cases it is common that we will exceed the threshold for the allowable number of checks. However, it should be possible to merge such checks, sice a check of any interval againt two other intervals separated by a constant offset (a,b), (a+c, b+c) will be equivalent with a check againt (a, b+c), as long as (a,b) and (a+c, b+c) overlap. Assuming the loop will be executed for a sufficient number of iterations, this will be true. If not true, checking against (a, b+c) is still safe (although not equivalent). As long as there are no dependencies between two accesses, we can merge their checks into a single one. We use this technique to construct groups of accesses, and then check the intervals associated with the groups instead of checking the accesses directly. Reviewers: anemet Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10386 llvm-svn: 241673
* [X86][SSE] Added (V)ROUNDSD + (V)ROUNDSS stack folding supportSimon Pilgrim2015-07-081-4/+8
| | | | llvm-svn: 241671
* Allow constfolding of llvm.sin.* and llvm.cos.* intrinsicsKarthik Bhat2015-07-081-0/+6
| | | | | | | | This patch const folds llvm.sin.* and llvm.cos.* intrinsics whenever feasible. Differential Revision: http://reviews.llvm.org/D10836 llvm-svn: 241665
* Remove IsLittleEndian from TargetLowering and redirect to DataLayoutMehdi Amini2015-07-086-23/+26
| | | | | | | | | | | | | | | | Summary: This change is part of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. Reviewers: echristo Subscribers: llvm-commits, rafael, yaron.keren Differential Revision: http://reviews.llvm.org/D11017 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 241655
* Redirect DataLayout from TargetMachine to Module in SjLjEHPrepareMehdi Amini2015-07-082-9/+5
| | | | | | | | | | | | | | | | Summary: This change is part of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. Reviewers: echristo Subscribers: yaron.keren, rafael, llvm-commits Differential Revision: http://reviews.llvm.org/D11009 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 241654
* [WinEH] Make llvm.x86.seh.restoreframe work for stack realignment prologuesReid Kleckner2015-07-077-34/+95
| | | | | | | | | | The incoming EBP value points to the end of a local stack allocation, so we can use that to restore ESI, the base pointer. Once we do that, we can use local stack allocations. If we know we need stack realignment, spill the original frame pointer in the prologue and reload it after restoring ESI. llvm-svn: 241648
* Redirect DataLayout from TargetMachine to Module in StackProtectorMehdi Amini2015-07-071-1/+1
| | | | | | | | | | | | | | | | Summary: This change is part of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. Reviewers: echristo Subscribers: llvm-commits, rafael, yaron.keren Differential Revision: http://reviews.llvm.org/D11010 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 241646
* MIR Printer: Use a module slot tracker to print global address operands. NFC.Alex Lorenz2015-07-071-13/+12
| | | | | | | | | This commit adopts the 'ModuleSlotTracker' class, which was surfaced in r240842, to print the global address operands. This change ensures that the slot tracker won't have to be recreated every time a global address operand is printed, making the MIR printing more efficient. llvm-svn: 241645
* [WinEH] Add localaddress intrinsic instead of using frameaddressReid Kleckner2015-07-072-9/+21
| | | | | | | Clang uses this for SEH finally. The new intrinsic will produce the right value when stack realignment is required. llvm-svn: 241643
* Add more nvcastsArnold Schwaighofer2015-07-071-0/+8
| | | | | | | | | Tim Northover has told me that they can occur when the compiler cleverly constructs constants - as demonstrated in the test case. rdar://21703486 llvm-svn: 241641
* [WebAssembly] Set the scheduling preference.Dan Gohman2015-07-071-0/+2
| | | | llvm-svn: 241637
* Rename llvm.frameescape and llvm.framerecover to localescape and localrecoverReid Kleckner2015-07-0714-47/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Initially, these intrinsics seemed like part of a family of "frame" related intrinsics, but now I think that's more confusing than helpful. Initially, the LangRef specified that this would create a new kind of allocation that would be allocated at a fixed offset from the frame pointer (EBP/RBP). We ended up dropping that design, and leaving the stack frame layout alone. These intrinsics are really about sharing local stack allocations, not frame pointers. I intend to go further and add an `llvm.localaddress()` intrinsic that returns whatever register (EBP, ESI, ESP, RBX) is being used to address locals, which should not be confused with the frame pointer. Naming suggestions at this point are welcome, I'm happy to re-run sed. Reviewers: majnemer, nicholas Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11011 llvm-svn: 241633
* fix typo; NFCSanjay Patel2015-07-071-1/+1
| | | | llvm-svn: 241629
* MIR Serialization: Serialize the 'dead' register machine operand flag.Alex Lorenz2015-07-074-2/+11
| | | | llvm-svn: 241624
* Redirect DataLayout from TargetMachine to Module in SelectionDAGMehdi Amini2015-07-0712-142/+145
| | | | | | | | | | | | | | | | | | | | Summary: SelectionDAG itself is not invoking directly the DataLayout in the TargetMachine, but the "TargetLowering" class is still using it. I'll address it in a following commit. This change is part of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. Reviewers: echristo Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11000 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 241618
* Revert "Revert r241570, it caused PR24053"David Majnemer2015-07-072-31/+23
| | | | | | | | This reverts commit r241602. We had a latent bug in SCCP where we would make a basic block empty and then proceed to ask questions about it's terminator. llvm-svn: 241616
* Redirect DataLayout from TargetMachine to Module in GlobalMergeMehdi Amini2015-07-071-13/+16
| | | | | | | | | | | | | | | | Summary: This change is part of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. Reviewers: echristo Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10987 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 241615
* Redirect DataLayout from TargetMachine to Module in CodeGen PrepareMehdi Amini2015-07-071-27/+28
| | | | | | | | | | | | | | | | Summary: This change is part of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. Reviewers: echristo Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10986 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 241614
* Redirect DataLayout from TargetMachine to Module in FastISelMehdi Amini2015-07-071-1/+1
| | | | | | | | | | | | | | | | Summary: This change is part of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. Reviewers: echristo Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10985 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 241613
* Add a pattern for a nvcast from v2f64 -> v4f32Arnold Schwaighofer2015-07-071-0/+1
| | | | | | | | | Since the NvCast is generated by the selection process the concerns about endianess and bit reversal don't apply. rdar://21703486 llvm-svn: 241611
* Redirect DataLayout from TargetMachine to Module in MachineFunctionMehdi Amini2015-07-071-20/+20
| | | | | | | | | | | | | | | | Summary: This change is part of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. Reviewers: echristo Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10984 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 241610
* Use default member initializers to deduplicate code in ↵Reid Kleckner2015-07-071-50/+19
| | | | | | X86MachineFunctionInfo, NFC llvm-svn: 241609
* Fix the -DBUILD_SHARED_LIBS=ON build.Rafael Espindola2015-07-073-2/+5
| | | | llvm-svn: 241608
* MIR Parser: wrap 'MBBSlots' from the MI parsing functions in a struct. NFC.Alex Lorenz2015-07-073-33/+32
| | | | | | | | | | | This commit modifies the interface for the machine instruction parsing functions by wrapping the parameter 'MBBSlots' in a new structure called 'PerFunctionMIParsingState'. This change is useful as in the future I will be able to pass new parameters to the machine instruction parser just by modifying the 'PerFunctionMIParsingState' structure instead of adding a new parameter to each function. llvm-svn: 241607
* Delete UnknownAddress. It is a perfectly valid symbol value.Rafael Espindola2015-07-073-11/+12
| | | | | | | | | | | getSymbolValue now returns a value that in convenient for most callers: * 0 for undefined * symbol size for common symbols * offset/address for symbols the rest Code that needs something more specific can check getSymbolFlags. llvm-svn: 241605
* Simplify by passing in the section of the symbol. NFC.Rafael Espindola2015-07-071-22/+5
| | | | llvm-svn: 241603
* Revert r241570, it caused PR24053Nico Weber2015-07-071-22/+29
| | | | llvm-svn: 241602
* [Hexagon] Fix unused variable warnings in NDEBUG build caused by r241595Krzysztof Parzyszek2015-07-072-12/+8
| | | | llvm-svn: 241600
* [WinEH] Add a report_fatal_error for 32-bit stack realignmentReid Kleckner2015-07-071-0/+5
| | | | | | | | | This type of prologue isn't supported yet. Implementing it should be a matter of copying the adjusted incoming EBP into ESI (the base pointer) instead of EBP. The original EBP can be saved and restored from other memory afterwards. llvm-svn: 241597
* [Hexagon] Implement bit-tracking facility with specifics for HexagonKrzysztof Parzyszek2015-07-075-0/+2832
| | | | | | | | This includes code that is intended to be target-independent as well as the Hexagon-specific details. This is just the framework without any users. llvm-svn: 241595
* Common symbols don't have a value.Rafael Espindola2015-07-071-3/+2
| | | | | | | | | | | | | At least not in the interface exposed by ObjectFile. This matches what ELF and COFF implement. Adjust existing code that was expecting them to have values. No overall functionality change intended. Another option would be to change the interface and the ELF and COFF implementations to say that the value of a common symbol is its size. llvm-svn: 241593
OpenPOWER on IntegriCloud