|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| ... |  | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Instead of computing a live interval per physreg, LiveIntervals can
compute live intervals per register unit. This makes impossible the
confusing situation where aliasing registers could have overlapping live
intervals. It should also make fixed interferernce checking cheaper
since registers have fewer register units than aliases.
Live intervals for regunits are computed on demand, using MRI use-def
chains and the new LiveRangeCalc class. Only regunits live in to ABI
blocks are precomputed during LiveIntervals::runOnMachineFunction().
The regunit liveness computations don't depend on LiveVariables.
llvm-svn: 158029 | 
| | 
| 
| 
| 
| 
| 
| | These LiveRangeCalc methods are to be used when computing a live range
from scratch.
llvm-svn: 158027 | 
| | 
| 
| 
| 
| 
| | Patch by Ivan Llopard.
llvm-svn: 158025 | 
| | 
| 
| 
| 
| 
| 
| | Minimum latency determines per-cycle scheduling groups.
Expected latency determines critical path and cost.
llvm-svn: 158021 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | expression (a * b + c) that can be implemented as a fused multiply-add (fma)
if the target determines that this will be more efficient. This intrinsic
will be used to implement FP_CONTRACT support and an aggressive FMA formation
mode.
If your target has a fast FMA instruction you should override the
isFMAFasterThanMulAndAdd method in TargetLowering to return true.
llvm-svn: 158014 | 
| | 
| 
| 
| 
| 
| 
| 
| | This allows a subtarget to explicitly specify the issue width and
other properties without providing pipeline stage details for every
instruction.
llvm-svn: 157979 | 
| | 
| 
| 
| 
| 
| 
| 
| | itinerary.
Use ILP heuristics for long latency instrs if no scoreboard exists.
llvm-svn: 157978 | 
| | 
| 
| 
| 
| 
| 
| 
| | valid itinerary but no pipeline stages.
An itinerary can contain useful scheduling information without specifying pipeline stages for each instruction.
llvm-svn: 157977 | 
| | 
| 
| 
| | llvm-svn: 157975 | 
| | 
| 
| 
| 
| 
| | Rematerialization is handled by LiveRangeEdit now.
llvm-svn: 157974 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | It is an old function that does a lot more than required by
CalcSpillWeights, which was the only remaining caller.
The isRematerializable() function never actually sets the isLoad
argument, so don't try to compute that.
llvm-svn: 157973 | 
| | 
| 
| 
| | llvm-svn: 157963 | 
| | 
| 
| 
| 
| 
| | No functional change.
llvm-svn: 157957 | 
| | 
| 
| 
| 
| 
| 
| | Remove the same pointers from all the other LiveRangeCalc functions,
simplifying the interface.
llvm-svn: 157941 | 
| | 
| 
| 
| | llvm-svn: 157925 | 
| | 
| 
| 
| | llvm-svn: 157885 | 
| | 
| 
| 
| 
| 
| | IntRange converted from struct to class. So main change everywhere is replacement of ".Low/High" with ".getLow/getHigh()"
llvm-svn: 157884 | 
| | 
| 
| 
| 
| 
| | IntegersSubsetGeneric, IntegersSubsetMapping: added IntTy template parameter, that allows use either APInt or IntItem. This change allows to write unittest for these classes.
llvm-svn: 157880 | 
| | 
| 
| 
| 
| 
| 
| | Check that the SDValue TargetLowering::LowerOperation returns is not null
before replacing the original node with the returned node.
llvm-svn: 157873 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | No functional change intended.
Sorry for the churn. The iterator classes are supposed to help avoid
giant commits like this one in the future. The TableGen-produced
register lists are getting quite large, and it may be necessary to
change the table representation.
This makes it possible to do so without changing all clients (again).
llvm-svn: 157854 | 
| | 
| 
| 
| 
| 
| 
| | After physreg coalescing was disabled, these functions can't do anything
useful with physregs anyway.
llvm-svn: 157849 | 
| | 
| 
| 
| 
| 
| | MCRegAliasIterator can include Reg itself in the list.
llvm-svn: 157848 | 
| | 
| 
| 
| 
| 
| 
| | MCRegAliasIterator can optionally visit the register itself, allowing
for simpler code.
llvm-svn: 157837 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | Factor out the expansion code into a function.
This change is to be enabled in clang.
rdar://9877866
llvm-svn: 157830 | 
| | 
| 
| 
| 
| 
| 
| | IntegersSubset devided into IntegersSubsetGeneric and into IntegersSubset itself. The first has no references to ConstantInt and works with IntItem only.
IntegersSubsetMapping also made generic. Here added second template parameter "IntegersSubsetTy" that allows to use on of two IntegersSubset types described below.
llvm-svn: 157815 | 
| | 
| 
| 
| | llvm-svn: 157813 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | casts
in multiple-return value scenarios, like what happens on X86-64 when returning
small structs.
llvm-svn: 157800 | 
| | 
| 
| 
| 
| 
| 
| 
| | types, as well as int<->ptr casts.  This allows us to tailcall functions
with some trivial casts between the call and return (i.e. because the
return types disagree).
llvm-svn: 157798 | 
| | 
| 
| 
| | llvm-svn: 157796 | 
| | 
| 
| 
| 
| 
| | Part of rdar://11570854
llvm-svn: 157786 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | This patch will optimize the following
        movq    %rdi, %rax
        subq    %rsi, %rax
        cmovsq  %rsi, %rdi
        movq    %rdi, %rax
to
        cmpq    %rsi, %rdi
        cmovsq  %rsi, %rdi
        movq    %rdi, %rax
Perform this optimization if the actual result of SUB is not used.
rdar: 11540023
llvm-svn: 157755 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | It helps compile exotic inline asm. In the test case, normal GR32
virtual registers use up eax-edx so the final GR32_ABCD live range has
no registers left. Since all the live ranges were tiny, we had no way of
prioritizing the smaller register class.
This patch allows tiny unspillable live ranges to be evicted by tiny
unspillable live ranges from a smaller register class.
<rdar://problem/11542429>
llvm-svn: 157715 | 
| | 
| 
| 
| 
| 
| | wrote and the usual LLVM convention.
llvm-svn: 157708 | 
| | 
| 
| 
| 
| 
| | operands of an FMA node.
llvm-svn: 157707 | 
| | 
| 
| 
| | llvm-svn: 157706 | 
| | 
| 
| 
| 
| 
| 
| | An empty list is not represented as a null pointer. Let TRI do its own
shortcuts.
llvm-svn: 157702 | 
| | 
| 
| 
| | llvm-svn: 157663 | 
| | 
| 
| 
| 
| 
| | marked as 'undef' since it may not already be live. This appeases -verify-machineinstrs.
llvm-svn: 157662 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | Besides adding the new insertPass function, this patch uses it to
enhance the existing -print-machineinstrs so that the MachineInstrs
after a specific pass can be printed.
Patch by Bin Zeng!
llvm-svn: 157655 | 
| | 
| 
| 
| | llvm-svn: 157640 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | ranges for the instruction about to be bundled. This fixes a bug in an external
project where an assertion was triggered due to spurious 'multiple defs' within
the bundle.
Patch by Ivan Llopard. Thanks Ivan!
llvm-svn: 157632 | 
| | 
| 
| 
| 
| 
| | IntegersSubsetMapping.
llvm-svn: 157612 | 
| | 
| 
| 
| | llvm-svn: 157594 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Implemented IntItem - the wrapper around APInt. Why not to use APInt item directly right now?
1. It will very difficult to implement case ranges as series of small patches. We got several large and heavy patches. Each patch will about 90-120 kb. If you replace ConstantInt with APInt in SwitchInst you will need to changes at the same time all Readers,Writers and absolutely all passes that uses SwitchInst.
2. We can implement APInt pool inside and save memory space. E.g. we use several switches that works with 256 bit items (switch on signatures, or strings). We can avoid value duplicates in this case.
3. IntItem can be easyly easily replaced with APInt.
4. Currenly we can interpret IntItem both as ConstantInt and as APInt. It allows to provide SwitchInst methods that works with ConstantInt for non-updated passes.
Why I need it right now? Currently I need to update SimplifyCFG pass (EqualityComparisons). I need to work with APInts directly a lot, so peaces of code
ConstantInt *V = ...;
if (V->getValue().ugt(AnotherV->getValue()) {
  ...
}
will look awful. Much more better this way:
IntItem V = ConstantIntVal->getValue();
if (AnotherV < V) {
}
Of course any reviews are welcome.
P.S.: I'm also going to rename ConstantRangesSet to IntegersSubset, and CRSBuilder to IntegersSubsetMapping (allows to map individual subsets of integers to the BasicBlocks).
Since in future these classes will founded on APInt, it will possible to use them in more generic ways.
llvm-svn: 157576 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | definition in the map before calling itself to retrieve the
DIE for the declaration.  Without this change, if this causes
getOrCreateSubprogramDIE to be recursively called on the definition,
it will create multiple DIEs for that definition.  Fixes PR12831.
llvm-svn: 157541 | 
| | 
| 
| 
| | llvm-svn: 157527 | 
| | 
| 
| 
| 
| 
| 
| | This is obviosly right but I don't see how to do this with proper vector
iterators without building a horrible mess of workarounds.
llvm-svn: 157526 | 
| | 
| 
| 
| 
| 
| | vector.begin()-1 is invalid too.
llvm-svn: 157525 | 
| | 
| 
| 
| 
| 
| 
| 
| | case.
Found by libstdc++'s debug mode.
llvm-svn: 157522 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | 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 |