summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* SDAGBuilder: Don't create an invalid iterator when there is only one switch ↵Benjamin Kramer2012-05-261-2/+2
| | | | | | | | case. Found by libstdc++'s debug mode. llvm-svn: 157522
* SelectionDAGBuilder: When emitting small compare chains for switches order ↵Benjamin Kramer2012-05-261-3/+18
| | | | | | | | | | | | | | them by using edge weights. SimplifyCFG tends to form a lot of 2-3 case switches when merging branches. Move the most likely condition to the front so it is checked first and the others can be skipped. This is currently not as effective as it could be because SimplifyCFG destroys profiling metadata when merging branches and switches. Merging branch weight metadata is tricky though. This code touches at most 3 cases so I didn't use a proper sorting algorithm. llvm-svn: 157521
* Since commit 157467, if reassociate isn't actually going to change an expressionDuncan Sands2012-05-261-17/+20
| | | | | | | | | | | then it doesn't alter the instructions composing it, however it would continue to move the instructions to just before the expression root. Ensure it doesn't move them either, so now it really does nothing if there is nothing to do. That commit also ensured that nsw etc flags weren't cleared if the expression was not being changed. Tweak this a bit so that it doesn't clear flags on the initial part of a computation either if that part didn't change but later bits did. llvm-svn: 157518
* SimplifyCFG: Turn the ad-hoc std::pair that represents switch cases into an ↵Benjamin Kramer2012-05-261-39/+54
| | | | | | explicit struct. llvm-svn: 157516
* Add support for branch weight metadata to MDBuilder and use it in various ↵Benjamin Kramer2012-05-262-32/+23
| | | | | | places. llvm-svn: 157515
* ScoreboardHazardRecognizer: Remove dead conditional in debug code.Benjamin Kramer2012-05-261-2/+1
| | | | | | Negative cycles are filtered out earlier. llvm-svn: 157514
* Move this debug statement earlier so it is easy to see the order inDuncan Sands2012-05-261-2/+2
| | | | | | which operands come flying out of the linearization stage. llvm-svn: 157512
* The llvm_gcda_increment_indirect_counter function writes to the arguments thatBill Wendling2012-05-251-17/+57
| | | | | | | | | | | | | | are passed in. However, those arguments may be in a write-protected area, as far as the runtime library is concerned. For instance, the data could be placed into a 'linkedit' section, which isn't writable. Emit the code from llvm_gcda_increment_indirect_counter directly into the function instead. Note: The code for this is ugly, and can lead to bloat. We should look into simplifying this code instead of having all of these branches. <rdar://problem/11181370> llvm-svn: 157505
* Fix predicate HasStandardEncoding in MipsInstrInfo.td per suggestion ofAkira Hatanaka2012-05-251-3/+2
| | | | | | Benjamin Kramer. llvm-svn: 157504
* bounds checking: add support for byval argumentsNuno Lopes2012-05-251-1/+9
| | | | llvm-svn: 157498
* Delete MipsExpandPseudo.cpp.Akira Hatanaka2012-05-251-117/+0
| | | | llvm-svn: 157496
* Move the code in MipsExpandPseudo to MipsInstrInfo::expandPostRAPseudo.Akira Hatanaka2012-05-255-9/+53
| | | | | | Delete MipsExpandPseudo. llvm-svn: 157495
* Remove the code that expands MIPS' .cpload directive.Akira Hatanaka2012-05-252-24/+0
| | | | llvm-svn: 157494
* Remove the code that emits MIPS' .cprestore directive.Akira Hatanaka2012-05-253-50/+0
| | | | llvm-svn: 157493
* Remove pseudo instructions that are no longer used.Akira Hatanaka2012-05-252-29/+0
| | | | llvm-svn: 157492
* boundschecking:Nuno Lopes2012-05-251-50/+104
| | | | | | | add support for select add experimental support for alloc_size metadata llvm-svn: 157481
* Change interface for TargetLowering::LowerCallTo and TargetLowering::LowerCallJustin Holewinski2012-05-2529-271/+275
| | | | | | | | | | to pass around a struct instead of a large set of individual values. This cleans up the interface and allows more information to be added to the struct for future targets without requiring changes to each and every target. NV_CONTRIB llvm-svn: 157479
* Make the reassociation pass more powerful so that it can handle expressionsDuncan Sands2012-05-251-255/+405
| | | | | | | | | | | | | | | | | with arbitrary topologies (previously it would give up when hitting a diamond in the use graph for example). The testcase from PR12764 is now reduced from a pile of additions to the optimal 1617*%x0+208. In doing this I changed the previous strategy of dropping all uses for expression leaves to one of dropping all but one use. This works out more neatly (but required a bunch of tweaks) and is also safer: some recently fixed bugs during recursive linearization were because the linearization code thinks it completely owns a node if it has no uses outside the expression it is linearizing. But if the node was also in another expression that had been linearized (and thus all uses of the node from that expression dropped) then the conclusion that it is completely owned by the expression currently being linearized is wrong. Keeping one use from within each linearized expression avoids this kind of mistake. llvm-svn: 157467
* misched: trace formattingAndrew Trick2012-05-252-7/+7
| | | | llvm-svn: 157455
* Compress MCRegisterInfo register name tables.Jakob Stoklund Olesen2012-05-251-1/+1
| | | | | | | Store (debugging) register names as offsets into a string table instead of as char pointers. llvm-svn: 157449
* Simplify code for calling a function where CanLowerReturn fails, fixing a ↵Eli Friedman2012-05-253-37/+12
| | | | | | small bug in the process. llvm-svn: 157446
* Silence unused variable warnings from when assertions are disabled.Kaelyn Uhrain2012-05-241-0/+2
| | | | llvm-svn: 157438
* misched: Use the same scheduling heuristics with -misched-topdown/bottomup.Andrew Trick2012-05-241-2/+16
| | | | | | (except the part about choosing direction) llvm-svn: 157437
* Shrink.Jakob Stoklund Olesen2012-05-241-7145/+18
| | | | llvm-svn: 157433
* Add support for range expressions in TableGen foreach loops.Jakob Stoklund Olesen2012-05-241-15/+50
| | | | | | | | | | | | Like this: foreach i = 0-127 in ... Use braces for composite ranges: foreach i = {0-3,9-7} in ... llvm-svn: 157432
* Don't put TGParser scratch results in the output.Jakob Stoklund Olesen2012-05-241-2/+2
| | | | | | Only fully expanded Records should go into RecordKeeper. llvm-svn: 157431
* Simplify TGParser::ProcessForEachDefs.Jakob Stoklund Olesen2012-05-242-103/+72
| | | | | | Use static type checking. llvm-svn: 157430
* misched: Trace regpressure.Andrew Trick2012-05-241-2/+4
| | | | llvm-svn: 157429
* misched: Give each ReadyQ a unique IDAndrew Trick2012-05-241-36/+45
| | | | llvm-svn: 157428
* misched: Added ScoreboardHazardRecognizer.Andrew Trick2012-05-242-49/+240
| | | | | | | | | | | | | | | | | | | The Hazard checker implements in-order contraints, or interlocked resources. Ready instructions with hazards do not enter the available queue and are not visible to other heuristics. The major code change is the addition of SchedBoundary to encapsulate the state at the top or bottom of the schedule, including both a pending and available queue. The scheduler now counts cycles in sync with the hazard checker. These are minimum cycle counts based on known hazards. Targets with no itinerary (x86_64) currently remain at cycle 0. To fix this, we need to provide some maximum issue width for all targets. We also need to add the concept of expected latency vs. minimum latency. llvm-svn: 157427
* misched: Release bottom roots in reverse order.Andrew Trick2012-05-241-9/+23
| | | | llvm-svn: 157426
* misched: rename ReadyQ classAndrew Trick2012-05-241-8/+9
| | | | llvm-svn: 157425
* misched: copy comments so compareRPDelta is readable by itself.Andrew Trick2012-05-241-1/+4
| | | | llvm-svn: 157424
* regpressure: Added RegisterPressure::dumpAndrew Trick2012-05-242-0/+20
| | | | llvm-svn: 157423
* regpressure: physreg livein/out fixAndrew Trick2012-05-241-2/+2
| | | | llvm-svn: 157422
* Remove the PTX back-end and all of its artifacts (triple, etc.)Justin Holewinski2012-05-2455-6767/+1
| | | | | | | | This back-end was deprecated in favor of the NVPTX back-end. NV_CONTRIB llvm-svn: 157417
* Turn on mips16 pseudo op when compiling for mips16.Akira Hatanaka2012-05-241-1/+7
| | | | | | | | Expand test case for this. Patch by Reed Kotler. llvm-svn: 157410
* Enable Mips16 compiler to compile a null program.Akira Hatanaka2012-05-244-6/+29
| | | | | | | | First code from the Mips16 compiler. Includes trivial test program. Patch by Reed Kotler. llvm-svn: 157408
* Silence Clang's -Wlogical-op-parentheses warning.David Blaikie2012-05-241-1/+1
| | | | | | I'm not sure it's really worth expressing this as a range rather than 3 specific equalities, but it doesn't seem fundamentally wrong either. llvm-svn: 157398
* Add half support to LLVM (for OpenCL)Tobias Grosser2012-05-242-10/+21
| | | | | | | | | | Submitted by: Anton Lokhmotov <Anton.Lokhmotov@arm.com> Approved by: o Anton Korobeynikov o Micah Villmow o David Neto llvm-svn: 157393
* PR1255 related changes (case ranges):Stepan Dyatkovskiy2012-05-241-40/+18
| | | | | | | LowerSwitch::Clusterify : main functinality was replaced with CRSBuilder::optimize, so big part of Clusterify's code was reduced. test/Transform/LowerSwitch/feature.ll - this test was refactored: grep + count was replaced with FileCheck usage. llvm-svn: 157384
* Fix -Wcovered-switch-default warning.Patrik Hägglund2012-05-241-1/+0
| | | | llvm-svn: 157381
* Convert assert(0) to llvm_unreachable.Craig Topper2012-05-245-31/+20
| | | | llvm-svn: 157380
* Mark some static arrays as const.Craig Topper2012-05-245-10/+10
| | | | llvm-svn: 157377
* Use uint16_t to store registers in static tables. Matches other tables.Craig Topper2012-05-241-5/+5
| | | | llvm-svn: 157375
* Use uint16_t to store register number in static tables to match other tables.Craig Topper2012-05-241-7/+7
| | | | llvm-svn: 157374
* Make some opcode tables static and const. Allows code to avoid making copies ↵Craig Topper2012-05-241-173/+219
| | | | | | to pass the tables around. llvm-svn: 157373
* Mark a couple arrays as static and const. Use array_lengthof instead of ↵Craig Topper2012-05-242-6/+6
| | | | | | sizeof/sizeof. llvm-svn: 157369
* Mark a static array as const.Craig Topper2012-05-241-1/+1
| | | | llvm-svn: 157368
* Mark a static table as const. Shrink opcode size in static tables to ↵Craig Topper2012-05-241-14/+9
| | | | | | uint16_t. Simplify loop iterating over one of those tables. No functional change intended. llvm-svn: 157367
OpenPOWER on IntegriCloud