summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Access the TargetLoweringInfo from the TargetMachine object instead of ↵Bill Wendling2013-06-196-39/+49
| | | | | | caching it. The TLI may change between functions. No functionality change. llvm-svn: 184349
* Don't cache the TLI object since we have access to it through TargetMachine ↵Bill Wendling2013-06-191-6/+8
| | | | | | already. llvm-svn: 184346
* During SelectionDAG building explicitly set a node to constant zero when theQuentin Colombet2013-06-181-0/+8
| | | | | | | | | | | | value is zero. This allows optmizations to kick in more easily. Fix some test cases so that they remain meaningful (i.e., not completely dead coded) when optimizations apply. <rdar://problem/14096009> superfluous multiply by high part of zero-extended value. llvm-svn: 184222
* Hopefully fix the MSVS build after r184105Timur Iskhodzhanov2013-06-181-0/+1
| | | | llvm-svn: 184178
* Use pointers to the MCAsmInfo and MCRegInfo.Bill Wendling2013-06-182-4/+3
| | | | | | | | | Someone may want to do something crazy, like replace these objects if they change or something. No functionality change intended. llvm-svn: 184175
* Simplify some of the code. No functionality change.Bill Wendling2013-06-181-7/+5
| | | | llvm-svn: 184172
* MI-Sched: handle ReadAdvance latencies as used by Swift.Andrew Trick2013-06-171-1/+4
| | | | llvm-svn: 184135
* Give RegMax higher priority.Andrew Trick2013-06-171-9/+9
| | | | llvm-svn: 184133
* Remove compareRPDelta.Andrew Trick2013-06-171-37/+0
| | | | | | A complex, expensive heuristic with little value in the current design. llvm-svn: 184132
* MI Sched: fix a typo in RegPressure heuristics.Andrew Trick2013-06-171-1/+1
| | | | llvm-svn: 184131
* MI-Sched: Remove another heuristic that is sensitive to queue order.Andrew Trick2013-06-171-6/+0
| | | | llvm-svn: 184130
* MI-Sched: Track multiple candidates with the same priority level.Andrew Trick2013-06-171-32/+25
| | | | | | | | This eliminates the MultiPressure scheduling "reason". It was sensitive to queue order. We don't like being sensitive to queue order. llvm-svn: 184129
* Directly access objects which may change during compilation.Bill Wendling2013-06-172-36/+68
| | | | llvm-svn: 184121
* Switch spill weights from a basic loop depth estimation to BlockFrequencyInfo.Benjamin Kramer2013-06-1711-50/+60
| | | | | | | | | | | | | | | | | | The main advantages here are way better heuristics, taking into account not just loop depth but also __builtin_expect and other static heuristics and will eventually learn how to use profile info. Most of the work in this patch is pushing the MachineBlockFrequencyInfo analysis into the right places. This is good for a 5% speedup on zlib's deflate (x86_64), there were some very unfortunate spilling decisions in its hottest loop in longest_match(). Other benchmarks I tried were mostly neutral. This changes register allocation in subtle ways, update the tests for it. 2012-02-20-MachineCPBug.ll was deleted as it's very fragile and the instruction it looked for was gone already (but the FileCheck pattern picked up unrelated stuff). llvm-svn: 184105
* DebugInfo: remove target-specific Frame Index handling for DBG_VALUE ↵David Blaikie2013-06-161-8/+0
| | | | | | | | | | MachineInstrs Frame index handling is now target-agnostic, so delete the target hooks for creation & asm printing of target-specific addressing in DBG_VALUEs and any related functions. llvm-svn: 184067
* Debug Info: Simplify Frame Index handling in DBG_VALUE Machine InstructionsDavid Blaikie2013-06-1611-131/+112
| | | | | | | | | | | | | | | | | | | | Rather than using the full power of target-specific addressing modes in DBG_VALUEs with Frame Indicies, simply use Frame Index + Offset. This reduces the complexity of debug info handling down to two representations of values (reg+offset and frame index+offset) rather than three or four. Ideally we could ensure that frame indicies had been eliminated by the time we reached an assembly or dwarf generation, but I haven't spent the time to figure out where the FIs are leaking through into that & whether there's a good place to convert them. Some FI+offset=>reg+offset conversion is done (see PrologEpilogInserter, for example) which is necessary for some SelectionDAG assumptions about registers, I believe, but it might be possible to make this a more thorough conversion & ensure there are no remaining FIs no matter how instruction selection is performed. llvm-svn: 184066
* DebugInfo: print DBG_VALUE MachineInstrs with [] for deref and drop the ↵David Blaikie2013-06-151-3/+13
| | | | | | offset when it's zero llvm-svn: 184045
* Missing NDEBUGs.Andrew Trick2013-06-151-0/+6
| | | | llvm-svn: 184039
* MI-Sched: heuristics using the new latency and machine model.Andrew Trick2013-06-151-234/+330
| | | | llvm-svn: 184038
* Machine Model: Add MicroOpBufferSize and resource BufferSize.Andrew Trick2013-06-155-102/+47
| | | | | | | | | | | | | Replace the ill-defined MinLatency and ILPWindow properties with with straightforward buffer sizes: MCSchedMode::MicroOpBufferSize MCProcResourceDesc::BufferSize These can be used to more precisely model instruction execution if desired. Disabled some misched tests temporarily. They'll be reenabled in a few commits. llvm-svn: 184032
* MI-Sched: Rename IssueCount to CurrMOps.Andrew Trick2013-06-151-8/+8
| | | | | | | "Counts" refer to scaled resource counts within a region. CurrMOps is simply the number of micro-ops to be issue in the current cycle. llvm-svn: 184031
* MI-Sched: Remove the temporary EnableCopyConstrain flag.Andrew Trick2013-06-151-7/+1
| | | | llvm-svn: 184030
* MI-Sched: added tracking of dependent latency for better heuristics.Andrew Trick2013-06-151-13/+26
| | | | | | | | | | | | | | Heuristics compare the critical path in the scheduled code, called ExpectedLatency, with the latency of instructions remaining to be scheduled. There are two ways to look at remaining latency: (1) Dependent latency includes the latency between unscheduled and scheduled instructions. (2) Independent latency is simply the height (bottom-up) or depth (top-down) of instructions currently in the ready Q. llvm-svn: 184029
* MI-Sched: DEBUG: print critical resource.Andrew Trick2013-06-151-0/+4
| | | | llvm-svn: 184028
* SelectionDAG: slightly refactor DAGCombiner::visitSELECT_CC to avoid ↵Stephen Lin2013-06-151-12/+14
| | | | | | | | redudant checks... This doesn't really effect performance due to all the relevant calls being transparent but is clearer. llvm-svn: 184027
* Debug Info: Don't print the display name and colon prefix for DEBUG_VALUE ↵David Blaikie2013-06-151-2/+5
| | | | | | comments if the display name is empty llvm-svn: 184026
* Introduce getSelect usage and use more getSelectCCMatt Arsenault2013-06-146-87/+90
| | | | llvm-svn: 184012
* SelectionDAG: minor fix to order of operands in comments to match the code Stephen Lin2013-06-141-3/+3
| | | | llvm-svn: 184008
* Mark rematerialized super/sub registers as dead.Tim Northover2013-06-141-0/+1
| | | | | | | | | | | | | When we're rematerializing into a not-quite-right register we already add the real definition as an imp-def, but we should also be marking the "official" register as dead, since nothing else is going to use it as a result of this remat. Not doing this can affect pressure tracking. rdar://problem/14158833 llvm-svn: 184002
* SelectionDAG: Fix incorrect condition checks in some cases of folding ↵Stephen Lin2013-06-141-16/+16
| | | | | | FADD/FMUL combinations; also improve accuracy of comments llvm-svn: 183993
* Make PrologEpilogInserter save/restore all callee saved registersDerek Schuff2013-06-141-1/+3
| | | | | | | | | | | in functions which call __builtin_unwind_init() __builtin_unwind_init() is an undocumented gcc intrinsic which has this effect, and is used in libgcc_eh. Goes part of the way toward fixing PR8541. llvm-svn: 183984
* Move #include from .h to .cpp file.Jakub Staszak2013-06-141-0/+1
| | | | llvm-svn: 183960
* Print ConstantPool entries initialized to Values with WriteAsOperand instead ofDan Gohman2013-06-121-1/+2
| | | | | | | operator<< so that functions are printed as just their name instead of as their entire definition, which is excessively verbose in this context. llvm-svn: 183871
* Formatting.Eric Christopher2013-06-111-1/+1
| | | | llvm-svn: 183807
* Remove a few fixmes, the only work we're doing is getting the stringEric Christopher2013-06-101-4/+0
| | | | | | to return and this is done all over. llvm-svn: 183704
* Fix up comment.Eric Christopher2013-06-101-1/+1
| | | | llvm-svn: 183703
* Remove unused function.Eric Christopher2013-06-101-6/+0
| | | | llvm-svn: 183698
* IndentCount is only used within NDEBUG code.Eric Christopher2013-06-101-0/+2
| | | | llvm-svn: 183695
* TargetLowering: Clean up method description commentsDavid Majnemer2013-06-081-3/+3
| | | | llvm-svn: 183623
* Reapply r183552. This time, use a standard type for the option to avoid templateQuentin Colombet2013-06-081-0/+13
| | | | | | | | | | | | | | | instantiation issue with non-standard type. Add a backend option to warn on a given stack size limit. Option: -mllvm -warn-stack-size=<limit> Output (if limit is exceeded): warning: Stack size limit exceeded (<actual size>) in <functionName>. The longer term plan is to hook that to a clang warning. PR:4072 <rdar://problem/13987214>. llvm-svn: 183595
* Revert commits related to stack warning.Quentin Colombet2013-06-071-13/+0
| | | | llvm-svn: 183579
* Add a backend option to warn on a given stack size limit.Quentin Colombet2013-06-071-0/+13
| | | | | | | | | | | | Option: -mllvm -warn-stack-size=<limit> Output (if limit is exceeded): warning: Stack size limit exceeded (<actual size>) in <functionName>. The longer term plan is to hook that to a clang warning. PR:4072 <rdar://problem/13987214> llvm-svn: 183552
* Teach AsmPrinter how to print odd constants.Quentin Colombet2013-06-071-2/+43
| | | | | | | | | | | Fix an assertion when the compiler encounters big constants whose bit width is not a multiple of 64-bits. Although clang would never generate something like this, the backend should be able to handle any legal IR. <rdar://problem/13363576> llvm-svn: 183544
* Support OpenBSD's native frame protection conventions.Rafael Espindola2013-06-071-11/+36
| | | | | | | | | | | | | | | OpenBSD's stack smashing protection differs slightly from other platforms: 1. The smash handler function is "__stack_smash_handler(const char *funcname)" instead of "__stack_chk_fail(void)". 2. There's a hidden "long __guard_local" object that gets linked into each executable and DSO. Patch by Matthew Dempsky. llvm-svn: 183533
* Correct wrong register in this example, pointed out by Baoshan Pang.Duncan Sands2013-06-071-1/+1
| | | | llvm-svn: 183495
* Fix break in r183446 - helps to increment the iterator in a loopDavid Blaikie2013-06-061-1/+2
| | | | llvm-svn: 183454
* Debug Info: simplify parameter ordering preservationDavid Blaikie2013-06-061-25/+21
| | | | | | | | | | | | | Seems we emit the parameter ordering number (spuriously named 'arg number') in the debug info, so there's no need to search through the variable list to figure out the parameter ordering. This implementation does 'always' do the work, even in non-optimized debug info (the previous implementation checked the existence of the 'variables' list on the subprogram which is only present in optimized builds). No intended functionality change. llvm-svn: 183446
* Cache the TargetLowering info object as a pointer.Bill Wendling2013-06-064-40/+39
| | | | | | | Caching it as a pointer allows us to reset it if the TargetMachine object changes. llvm-svn: 183361
* Don't cache the TargetLoweringInfo object inside of the FunctionLowering object.Bill Wendling2013-06-062-18/+19
| | | | | | | | The TargetLoweringInfo object is owned by the TargetMachine. In the future, the TargetMachine object may change, which may also change the TargetLoweringInfo object. llvm-svn: 183356
* Add space to assert message.Bill Wendling2013-06-051-1/+1
| | | | llvm-svn: 183346
OpenPOWER on IntegriCloud