summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Turn AMDGPUSubtarget::getDataLayout into a static function.Rafael Espindola2013-12-143-29/+24
| | | | | | No functionality change. llvm-svn: 197310
* [block-freq] Rename getEntryFrequency() -> getEntryFreq() to match ↵Michael Gottesman2013-12-144-5/+5
| | | | | | getBlockFreq() in all *BlockFrequencyInfo*. llvm-svn: 197304
* [block-freq] Teach branch probability how to return the edge weight in ↵Michael Gottesman2013-12-141-0/+10
| | | | | | | | | | between a BasicBlock and one of its successors. IMHO At some point BasicBlock should be refactored along the lines of MachineBasicBlock so that successors/weights are actually embedded within the block. Now is not that time though. llvm-svn: 197303
* [block-freq] Add a right shift to BlockFrequency that saturates at 1.Michael Gottesman2013-12-141-0/+12
| | | | llvm-svn: 197302
* [block-freq] Remove old BlockFrequency entry frequency and printing code.Michael Gottesman2013-12-141-21/+0
| | | | llvm-svn: 197297
* [block-freq] Refactor LiveInterals::getSpillWeight to use the new ↵Michael Gottesman2013-12-144-8/+10
| | | | | | | | | | | | | | | | | | | | | | | MachineBlockFrequencyInfo methods. This is slightly more interesting than the previous batch of changes. Specifically: 1. We refactor getSpillWeight to take a MachineBlockFrequencyInfo (MBFI) object. This enables us to completely encapsulate the actual manner we use the MachineBlockFrequencyInfo to get our spill weights. This yields cleaner code since one does not need to fetch the actual block frequency before getting the spill weight if all one wants it the spill weight. It also gives us access to entry frequency which we need for our computation. 2. Instead of having getSpillWeight take a MachineBasicBlock (as one might think) to look up the block frequency via the MBFI object, we instead take in a MachineInstr object. The reason for this is that the method is supposed to return the spill weight for an instruction according to the comments around the function. llvm-svn: 197296
* Teach MemoryBuiltins about address spacesMatt Arsenault2013-12-141-5/+11
| | | | llvm-svn: 197292
* [block-freq] Store MBFI as a field on SpillPlacement so we can access it to ↵Michael Gottesman2013-12-142-3/+5
| | | | | | get the entry frequency while processing data. llvm-svn: 197291
* [block-freq] Update MachineBlockPlacement and RegAllocGreedy to use the new ↵Michael Gottesman2013-12-142-9/+13
| | | | | | MachineBlockFrequencyInfo methods. llvm-svn: 197290
* [block-freq] Update BlockFrequencyInfo/MachineBlockFrequencyInfo to use the ↵Michael Gottesman2013-12-142-2/+2
| | | | | | new print methods. llvm-svn: 197289
* Print the address space of a MachineMemOperandMatt Arsenault2013-12-141-0/+4
| | | | llvm-svn: 197288
* [block-freq] Add the equivalent methods to MachineBlockFrequencyInfo and ↵Michael Gottesman2013-12-142-0/+27
| | | | | | BlockFrequencyInfo that were added to BlockFrequencyImpl in r197285 and r197284. llvm-svn: 197287
* Pointer sizes are stored in Bytes. Fix variables names to say so.Rafael Espindola2013-12-131-19/+19
| | | | | | Also update for the current naming style. llvm-svn: 197283
* Fixed a bug in getARMFixupKindMachOInfo() where three ARM fixup kindsKevin Enderby2013-12-131-1/+5
| | | | | | | | | | | were falling into the cases for 24-bit branch kinds which are not 24-bit branches. The routine is to return false for fixups are expected to always be resolvable at assembly time. Which these three fixups are as they have limited displacement and are for local references within a function. rdar://15586725 llvm-svn: 197282
* comment typo.Andrew Trick2013-12-131-1/+1
| | | | llvm-svn: 197278
* Remove APInt::extractBit since it is already implemented via operator[]. ↵Michael Gottesman2013-12-131-8/+0
| | | | | | Change tests for extractBit to test operator[]. llvm-svn: 197277
* DebugInfo: Move type units into the debug_types section with appropriate ↵David Blaikie2013-12-136-18/+65
| | | | | | | | | | | | | | | | | | | | | | | | comdat grouping and type unit headers This commit does not complete the type units feature - there are issues around fission support (skeletal type units, pubtypes/pubnames) and hashing of some types including those containing references to types in other type units. Originally committed as r197073 and reverted in r197079. Recommitted as r197197 to reproduce the failure and reverted as r197199 Turns out there was unstable ordering in the type unit dumping code. Fixed by using MapVector in DWARFContext to store the debug_types comdat sections. Recommitted as r197210 with a fix to dumping and reverted as r197211 because I was a bit gun shy and thought I saw a failure that turned out to be unrelated. So here we go - once more with feeling! \o/ llvm-svn: 197275
* [block-freq] Add the APInt method extractBit.Michael Gottesman2013-12-131-0/+8
| | | | llvm-svn: 197271
* Revert "Convert liveness tracking to work on a sub-register level instead of ↵Andrew Trick2013-12-135-122/+146
| | | | | | | | | | just register units." This reverts commit r197253. This was a great change, but Juergen should be the commit author. llvm-svn: 197262
* Revert "Liveness Analysis Pass"Andrew Trick2013-12-137-253/+14
| | | | | | | | | | | | | | This reverts commit r197254. This was an accidental merge of Juergen's patch. It will be checked in shortly, but wasn't meant to go in quite yet. Conflicts: include/llvm/CodeGen/StackMaps.h lib/CodeGen/StackMaps.cpp test/CodeGen/X86/stackmap-liveness.ll llvm-svn: 197260
* Grow the stackmap/patchpoint format to hold 64-bit IDs.Andrew Trick2013-12-132-9/+8
| | | | llvm-svn: 197255
* Liveness Analysis PassAndrew Trick2013-12-137-13/+252
| | | | llvm-svn: 197254
* Convert liveness tracking to work on a sub-register level instead of just ↵Andrew Trick2013-12-135-146/+122
| | | | | | register units. llvm-svn: 197253
* [AArch64] Simplify the Neon Scalar3Same patterns for floating-point reciprocalChad Rosier2013-12-131-91/+65
| | | | | | | | | step, floating-point reciprocal square root step, floating-point absolute difference, and integer/floating-point compare instructions. Also, move the scalar general arithmetic operation patterns closer to similar code. No functional change intended. llvm-svn: 197250
* Assume defaults to produce smaller datalayout strings.Rafael Espindola2013-12-136-26/+10
| | | | llvm-svn: 197249
* Fix pr18235.Rafael Espindola2013-12-132-25/+18
| | | | | | | | | | The cpp backend is not a reasonable fallback for a missing target. It is a very special backend, so it is reasonable to use it only if explicitly requested. While at it, simplify the interface a bit. llvm-svn: 197241
* [SystemZ] Optimize X [!=]= Y in cases where X - Y or Y - X is also computedRichard Sandiford2013-12-131-0/+21
| | | | | | | In those cases it's better to compare the result of the subtraction against zero. llvm-svn: 197239
* [SystemZ] Make more use of TMHHRichard Sandiford2013-12-131-25/+53
| | | | | | | | | | This originally came about after noticing that InstCombine turns some of the TMHH (icmp (and...), ...) tests into plain comparisons. Since there is no instruction to compare with a 64-bit immediate, TMHH is generally better than an ordered comparison for the cases that it can handle. llvm-svn: 197238
* test commit.Iain Sandoe2013-12-131-1/+1
| | | | | | Amend a comment. llvm-svn: 197237
* [SystemZ] Extend integer absolute selectionRichard Sandiford2013-12-134-4/+55
| | | | | | | | This patch makes more use of LPGFR and LNGFR. It builds on top of the LTGFR selection from r197234. Most of the tests are motivated by what InstCombine would produce. llvm-svn: 197236
* [SystemZ] Add a structure to represent a selected comparisonRichard Sandiford2013-12-131-175/+180
| | | | | | | | | | | ...in an attempt to rein back the increasingly complex selection code. A knock-on effect is that ICmpType is exposed from the outset, which slightly simplifies adjustSubwordCmp. The code is no piece of art even after this change, but at least it should be slightly better. No behavioral change intended. llvm-svn: 197235
* [SystemZ] Make more use of LTGFRRichard Sandiford2013-12-131-0/+31
| | | | | | | | | | | | InstCombine turns (sext (trunc)) into (ashr (shl)), then converts any comparison of the ashr against zero into a comparison of the shl against zero. This makes sense in itself, but we want to undo it for z, since the sign- extension instruction has a CC-setting form. I've included tests for both the original and InstCombined variants, but the former already worked. The patch fixes the latter. llvm-svn: 197234
* X86: When lowering shl_parts, don't emit shift amounts larger than the bit ↵Benjamin Kramer2013-12-131-2/+10
| | | | | | | | | | | | | width. While it's safe for the X86-specific shift nodes, dag combining will kill generic nodes. Insert an AND to make it safe, isel will nuke it as x86's shift instructions have an implicit AND. Fixes PR16108, which contains a contraption to hit this case in between constant folders. llvm-svn: 197228
* Enabling thumb2 mode used to force support for armv6t2. Replace thisJoerg Sonnenberger2013-12-131-4/+3
| | | | | | with a temporary assertion and adjust the various test cases. llvm-svn: 197224
* [mips] Add checks for alignment and maximum displacements for most of theMatheus Almeida2013-12-132-5/+75
| | | | | | | | | | | branch instructions for mips and micromips instruction sets thus avoiding the situation of generating branches to undesired locations if offsets cannot be encoded. This patch also checks if a fixup cannot be applied and returns a fatal error if that's the case. llvm-svn: 197223
* [inliner] Fix PR18206 by preventing inlining functions that call setjmpChandler Carruth2013-12-131-1/+1
| | | | | | | | | | | | | through an invoke instruction. The original patch for this was written by Mark Seaborn, but I've reworked his test case into the existing returns_twice test case and implemented the fix by the prior refactoring to actually run the cost analysis over invoke instructions, and then here fixing our detection of the returns_twice attribute to work for both calls and invokes. We never noticed because we never saw an invoke. =[ llvm-svn: 197216
* [inliner] Completely change (and fix) how the inline cost analysisChandler Carruth2013-12-131-37/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | handles terminator instructions. The inline cost analysis inheritted some pretty rough handling of terminator insts from the original cost analysis, and then made it much, much worse by factoring all of the important analyses into a separate instruction visitor. That instruction visitor never visited the terminator. This works fine for things like conditional branches, but for many other things we simply computed The Wrong Value. First example are unconditional branches, which should be free but were counted as full cost. This is most significant for conditional branches where the condition simplifies and folds during inlining. We paid a 1 instruction tax on every branch in a straight line specialized path. =[ Oh, we also claimed that the unreachable instruction had cost. But it gets worse. Let's consider invoke. We never applied the call penalty. We never accounted for the cost of the arguments. Nope. Worse still, we didn't handle the *correctness* constraints of not inlining recursive invokes, or exception throwing returns_twice functions. Oops. See PR18206. Sadly, PR18206 requires yet another fix, but this refactoring is at least a huge step in that direction. llvm-svn: 197215
* Revert "DebugInfo: Move type units into the debug_types section with ↵David Blaikie2013-12-136-65/+18
| | | | | | | | appropriate comdat grouping and type unit headers" This reverts commit r197210. llvm-svn: 197211
* DebugInfo: Move type units into the debug_types section with appropriate ↵David Blaikie2013-12-136-18/+65
| | | | | | | | | | | | | | | | | | comdat grouping and type unit headers This commit does not complete the type units feature - there are issues around fission support (skeletal type units, pubtypes/pubnames) and hashing of some types including those containing references to types in other type units. Originally committed as r197073 and reverted in r197079. Recommitted as r197197 to reproduce the failure and reverted as r197199 Turns out there was unstable ordering in the type unit dumping code. Fixed by using MapVector in DWARFContext to store the debug_types comdat sections. llvm-svn: 197210
* Change stack probing code for MingW.Kai Nacke2013-12-131-9/+7
| | | | | | | | | Since gcc 4.6 the compiler uses ___chkstk_ms which has the same semantics as the MS CRT function __chkstk. This simplifies the prologue generation a bit. Reviewed by Rafael Espíndola. llvm-svn: 197205
* Revert "DebugInfo: Move type units into the debug_types section with ↵David Blaikie2013-12-134-57/+9
| | | | | | | | appropriate comdat grouping and type unit headers" This reverts commit r197197. llvm-svn: 197199
* llvm-cov: Added -b option for branch probabilities.Yuchen Wu2013-12-131-22/+135
| | | | | | | | | | | This option tells llvm-cov to print out branch probabilities when a basic block contains multiple branches. It also prints out some function summary info including the number of times the function enters, the percent of time it returns, and how many blocks were executed. Also updated tests. llvm-svn: 197198
* DebugInfo: Move type units into the debug_types section with appropriate ↵David Blaikie2013-12-134-9/+57
| | | | | | | | | | | | | | | | | | | comdat grouping and type unit headers This commit does not complete the type units feature - there are issues around fission support (skeletal type units, pubtypes/pubnames) and hashing of some types including those containing references to types in other type units. Originally committed as r197073 and reverted in r197079. This commit originally got jumbled up with another build-breaking commit and I can't find the failures I thought this caused anymore. Recommitting to hopefully get some clean buildbot results to work from. I have a sneaking suspicion there's unstable output in the comdat group output of MCStreamer... llvm-svn: 197197
* Fix a use-after-free error in GlobalOpt CleanupConstantGlobalUsersHal Finkel2013-12-121-2/+11
| | | | | | | | | | | | GlobalOpt's CleanupConstantGlobalUsers function uses a worklist array to manage constant users to be visited. The pointers in this array need to be weak handles because when we delete a constant array, we may also be holding a pointer to one of its elements (or an element of one of its elements if we're dealing with an array of arrays) in the worklist. Fixes PR17347. llvm-svn: 197178
* Initialize the barrier pass llvm::initializeIPOHal Finkel2013-12-121-0/+1
| | | | | | | | | The barrier pass is a temporary hack, and should go away soon. Nevertheless, if we don't initialize it, then opt will not understand -barrier, and this will break bugpoint (because when it dumps the passes from the default pass manager -barrier will be there). llvm-svn: 197177
* Simplify the datalayout string of ARM and AArch64.Rafael Espindola2013-12-122-4/+4
| | | | | | | | No functionality change. Reviewed by Tim Northover. llvm-svn: 197172
* Simplify the SystemZ datalayout string.Rafael Espindola2013-12-121-2/+1
| | | | | | Reviewed by Richard Sandiford. llvm-svn: 197170
* Use "a" instead of "a0" in DataLayout.Rafael Espindola2013-12-123-3/+3
| | | | | | It means exactly the same and is just a bit shorter. llvm-svn: 197169
* Fix Typo.Rafael Espindola2013-12-121-1/+1
| | | | llvm-svn: 197168
* Convert the other getHostByName implementations to StringRef.Rafael Espindola2013-12-121-5/+5
| | | | llvm-svn: 197166
OpenPOWER on IntegriCloud