| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 154039
|
| |
|
|
|
|
|
|
| |
This allows us to keep passing reduced masks to SimplifyDemandedBits, but
know about all the bits if SimplifyDemandedBits fails. This allows instcombine
to simplify cases like the one in the included testcase.
llvm-svn: 154011
|
| |
|
|
| |
llvm-svn: 153996
|
| |
|
|
|
|
| |
enum values
llvm-svn: 153984
|
| |
|
|
|
|
| |
would crash if it encountered a 1 element VSELECT. Solution is slightly more complicated than just creating a SELET as we have to mask or sign extend the vector condition if it had different boolean contents from the scalar condition. Fixes <rdar://problem/11178095>
llvm-svn: 153976
|
| |
|
|
|
|
|
|
|
|
|
| |
When folding X == X we need to check getBooleanContents() to determine if the
result is a vector of ones or a vector of negative ones.
I tried creating a test case, but the problem seems to only be exposed on a
much older version of clang (around r144500).
rdar://10923049
llvm-svn: 153966
|
| |
|
|
|
|
| |
operations, and prevent the DAGCombiner from turning them into bitwise operations if they do.
llvm-svn: 153901
|
| |
|
|
|
|
|
|
|
| |
shuffles.
Do not try to optimize swizzles of shuffles if the source shuffle has more than
a single user, except when the source shuffle is also a swizzle.
llvm-svn: 153864
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Simplify xor/and/or (bitcast(A), bitcast(B)) -> bitcast(op (A,B))
(and also scalar_to_vector).
2. Xor/and/or are indifferent to the swizzle operation (shuffle of one src).
Simplify xor/and/or (shuff(A), shuff(B)) -> shuff(op (A, B))
3. Optimize swizzles of shuffles: shuff(shuff(x, y), undef) -> shuff(x, y).
4. Fix an X86ISelLowering optimization which was very bitcast-sensitive.
Code which was previously compiled to this:
movd (%rsi), %xmm0
movdqa .LCPI0_0(%rip), %xmm2
pshufb %xmm2, %xmm0
movd (%rdi), %xmm1
pshufb %xmm2, %xmm1
pxor %xmm0, %xmm1
pshufb .LCPI0_1(%rip), %xmm1
movd %xmm1, (%rdi)
ret
Now compiles to this:
movl (%rsi), %eax
xorl %eax, (%rdi)
ret
llvm-svn: 153848
|
| |
|
|
|
|
|
|
| |
This is the CodeGen equivalent of r153747. I tested that there is not noticeable
performance difference with any combination of -O0/-O2 /-g when compiling
gcc as a single compilation unit.
llvm-svn: 153817
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
here but it has no other uses, then we have a problem. E.g.,
int foo (const int *x) {
char a[*x];
return 0;
}
If we assign 'a' a vreg and fast isel later on has to use the selection
DAG isel, it will want to copy the value to the vreg. However, there are
no uses, which goes counter to what selection DAG isel expects.
<rdar://problem/11134152>
llvm-svn: 153705
|
| |
|
|
| |
llvm-svn: 153571
|
| |
|
|
| |
llvm-svn: 153513
|
| |
|
|
| |
llvm-svn: 153428
|
| |
|
|
|
|
| |
PPC64 SVR4 ABI.
llvm-svn: 153372
|
| |
|
|
|
|
| |
rdar://11096639
llvm-svn: 153270
|
| |
|
|
|
|
| |
rdar://11096639
llvm-svn: 153269
|
| |
|
|
|
|
|
|
|
| |
execution-time regression for nsieve-bits on the ARMv7 -O0 -g nightly tester.
This may also improve compile-time on architectures that would otherwise
generate a libcall for urem (e.g., ARM) or fall back to the DAG selector.
rdar://10810716
llvm-svn: 153230
|
| |
|
|
|
|
|
|
| |
Type legalization can zero-extend the elements of the build_vector node, so,
for example, we may have an <8 x i8> with i32 elements of value 255. That
should return 'true' for the vector being all ones.
llvm-svn: 153203
|
| |
|
|
|
|
| |
users of the final load to the worklist too. Needed by changes I'm preparing to make to X86 backend.
llvm-svn: 153078
|
| |
|
|
|
|
|
|
|
|
| |
a variable. The previous code would break the debug info changing
code invariant. This will regress debug info for arguments where
we elide the alloca created.
Fixes rdar://11066468
llvm-svn: 153074
|
| |
|
|
| |
llvm-svn: 153073
|
| |
|
|
| |
llvm-svn: 153072
|
| |
|
|
| |
llvm-svn: 153071
|
| |
|
|
| |
llvm-svn: 153064
|
| |
|
|
| |
llvm-svn: 153035
|
| |
|
|
|
|
|
|
|
| |
for workaround of g++-4.4's miscompilation.
It caused MSP430DAGToDAGISel::SelectIndexedBinOp() to be miscompiled.
When two ReplaceUses()'s are expanded as inline, vtable in base class is stored to latter (ISelUpdater)ISU.
llvm-svn: 152877
|
| |
|
|
|
|
| |
Part of rdar://8905263
llvm-svn: 152845
|
| |
|
|
| |
llvm-svn: 152844
|
| |
|
|
| |
llvm-svn: 152843
|
| |
|
|
|
|
| |
add the new node into the work list because there is a potential for further optimizations.
llvm-svn: 152784
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Transform:
(fsub x, (fadd x, y)) -> (fneg y) and
(fsub x, (fadd y, x)) -> (fneg y)
if 'unsafe math' is specified.
<rdar://problem/7540295>
llvm-svn: 152777
|
| |
|
|
|
|
|
| |
expensive "getFirstTerminator" call. This reduces the time of compilation in
PR12258 from >10 minutes to < 10 seconds.
llvm-svn: 152704
|
| |
|
|
|
|
| |
that would trigger the truncation case.
llvm-svn: 152678
|
| |
|
|
|
|
|
|
|
| |
(i16 load $addr+c*sizeof(i16)) and replace uses of (i32 vextract) with the
i16 load. It should issue an extload instead: (i32 extload $addr+c*sizeof(i16)).
rdar://11035895
llvm-svn: 152675
|
| |
|
|
| |
llvm-svn: 152614
|
| |
|
|
| |
llvm-svn: 152613
|
| |
|
|
|
|
| |
No functionality change.
llvm-svn: 152611
|
| |
|
|
|
|
|
| |
Renamed methods caseBegin, caseEnd and caseDefault with case_begin, case_end, and case_default.
Added some notes relative to case iterators.
llvm-svn: 152532
|
| |
|
|
| |
llvm-svn: 152454
|
| |
|
|
| |
llvm-svn: 152301
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120130/136146.html
Implemented CaseIterator and it solves almost all described issues: we don't need to mix operand/case/successor indexing anymore. Base iterator class is implemented as a template since it may be initialized either from "const SwitchInst*" or from "SwitchInst*".
ConstCaseIt is just a read-only iterator.
CaseIt is read-write iterator; it allows to change case successor and case value.
Usage of iterator allows totally remove resolveXXXX methods. All indexing convertions done automatically inside the iterator's getters.
Main way of iterator usage looks like this:
SwitchInst *SI = ... // intialize it somehow
for (SwitchInst::CaseIt i = SI->caseBegin(), e = SI->caseEnd(); i != e; ++i) {
BasicBlock *BB = i.getCaseSuccessor();
ConstantInt *V = i.getCaseValue();
// Do something.
}
If you want to convert case number to TerminatorInst successor index, just use getSuccessorIndex iterator's method.
If you want initialize iterator from TerminatorInst successor index, use CaseIt::fromSuccessorIndex(...) method.
There are also related changes in llvm-clients: klee and clang.
llvm-svn: 152297
|
| |
|
|
|
|
|
| |
We had half the API with one convention, half with another. Now was a
good time to clean it up.
llvm-svn: 152255
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ScheduleDAG is responsible for the DAG: SUnits and SDeps. It provides target hooks for latency computation.
ScheduleDAGInstrs extends ScheduleDAG and defines the current scheduling region in terms of MachineInstr iterators. It has access to the target's scheduling itinerary data. ScheduleDAGInstrs provides the logic for building the ScheduleDAG for the sequence of MachineInstrs in the current region. Target's can implement highly custom schedulers by extending this class.
ScheduleDAGPostRATDList provides the driver and diagnostics for current postRA scheduling. It maintains a current Sequence of scheduled machine instructions and logic for splicing them into the block. During scheduling, it uses the ScheduleHazardRecognizer provided by the target.
Specific changes:
- Removed driver code from ScheduleDAG. clearDAG is the only interface needed.
- Added enterRegion/exitRegion hooks to ScheduleDAGInstrs to delimit the scope of each scheduling region and associated DAG. They should be used to setup and cleanup any region-specific state in addition to the DAG itself. This is necessary because we reuse the same ScheduleDAG object for the entire function. The target may extend these hooks to do things at regions boundaries, like bundle terminators. The hooks are called even if we decide not to schedule the region. So all instructions in a block are "covered" by these calls.
- Added ScheduleDAGInstrs::begin()/end() public API.
- Moved Sequence into the driver layer, which is specific to the scheduling algorithm.
llvm-svn: 152208
|
| |
|
|
|
|
| |
ScheduleDAG has nothing to do with how the instructions are scheduled.
llvm-svn: 152206
|
| |
|
|
|
|
| |
ScheduleDAG will not refer to the scheduled instruction sequence.
llvm-svn: 152205
|
| |
|
|
|
|
| |
ScheduleDAG will not refer to the scheduled instruction sequence.
llvm-svn: 152204
|
| |
|
|
| |
llvm-svn: 152203
|
| |
|
|
|
|
| |
Soon, ScheduleDAG will not refer to the BB.
llvm-svn: 152177
|
| |
|
|
| |
llvm-svn: 152175
|