| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Same as r234255, but for lib/CodeGen and lib/Target.
llvm-svn: 234258
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fast isel used to zero extends immediates to 64 bits. This normally goes
unnoticed because the value is truncated to 32 bits for output.
Two cases were it is noticed:
* We fail to use smaller encodings.
* If the original constant was smaller than i32.
In the tests using i1 constants, codegen would change to use -1, which is fine
(and matches what regular isel does) since only the lowest bit is then used.
Instead, this patch then changes the ir to use i8 constants, which looks more
like what clang produces.
llvm-svn: 234249
|
| |
|
|
|
|
|
|
|
|
| |
The uselist isn't enough to infer anything about the lifetime of such
allocas. If we want to re-add this optimization, we will need to
leverage lifetime markers to do it.
Fixes PR23122.
llvm-svn: 234196
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D8715
llvm-svn: 234179
|
| |
|
|
|
|
| |
NFCI.
llvm-svn: 234118
|
| |
|
|
| |
llvm-svn: 234106
|
| |
|
|
|
|
|
|
| |
re-association
Scalar integers are commuted to move constants to the RHS for re-association - this ensures vectors do the same.
llvm-svn: 234092
|
| |
|
|
|
|
| |
Now all fields in the WinEH xdata have been filled out.
llvm-svn: 234067
|
| |
|
|
|
|
|
| |
This add support for catching an exception such that an exception object
available to the catch handler will be initialized by the runtime.
llvm-svn: 234062
|
| |
|
|
|
|
|
|
| |
We don't need to represent UnwindHelp in IR. Instead, we can use the
knowledge that we are emitting the parent function to decide if we
should create the UnwindHelp stack object.
llvm-svn: 234061
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D8596
llvm-svn: 234041
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As a follow-up to r234021, assert that a debug info intrinsic variable's
`MDLocalVariable::getInlinedAt()` always matches the
`MDLocation::getInlinedAt()` of its `!dbg` attachment.
The goal here is to get rid of `MDLocalVariable::getInlinedAt()`
entirely (PR22778), but I'll let these assertions bake for a while
first.
If you have an out-of-tree backend that just broke, you're probably
attaching the wrong `DebugLoc` to a `DBG_VALUE` instruction. The one
you want is the location that was attached to the corresponding
`@llvm.dbg.declare` or `@llvm.dbg.value` call that you started with.
llvm-svn: 234038
|
| |
|
|
|
|
|
| |
Use `MDLocalVariable` and `MDExpression` directly for the arguments of
`EmitFuncArgumentDbgValue()` to simplify a follow-up patch.
llvm-svn: 234026
|
| |
|
|
|
|
|
|
| |
This patch attempts to fold the shuffling of 'scalar source' inputs - BUILD_VECTOR and SCALAR_TO_VECTOR nodes - if the shuffle node is the only user. This folds away a lot of unnecessary shuffle nodes, and allows quite a bit of constant folding that was being missed.
Differential Revision: http://reviews.llvm.org/D8516
llvm-svn: 234004
|
| |
|
|
|
|
|
| |
A catch (...) doesn't have a type descriptor. Instead, the 'adjectives'
field has bit six set.
llvm-svn: 233788
|
| |
|
|
|
|
| |
scalar_to_vector.
llvm-svn: 233778
|
| |
|
|
|
|
| |
Remove a redundant condition, no functional change intended.
llvm-svn: 233770
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This lets us catch exceptions in simple cases.
N.B. Things that do not work include (but are not limited to):
- Throwing from within a catch handler.
- Catching an object with a named catch parameter.
- 'CatchHigh' is fictitious, we aren't sure of its purpose.
- We aren't entirely efficient with regards to the number of EH states
that we generate.
- IP-to-State tables are sensitive to the order of emission.
llvm-svn: 233767
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing code in getMemsetValue only handled integer-preferred types when
the fill value was not a constant. Make this more robust in two ways:
1. If the preferred type is a floating-point value, do the mul-splat trick on
the corresponding integer type and then bitcast.
2. If the preferred type is a vector, do the mul-splat trick on one vector
element, and then build a vector out of them.
Fixes PR22754 (although, we should also turn off use of vector types at -O0).
llvm-svn: 233749
|
| |
|
|
| |
llvm-svn: 233701
|
| |
|
|
|
|
|
|
|
|
|
| |
it more liberally.
SplitVecOp_TRUNCATE has logic for recursively splitting oversize vectors
that need more than one round of splitting to become legal. There are many
other ISD nodes that could benefit from this logic, so factor it out and
use it for FP_TO_UINT,FP_TO_SINT,SINT_TO_FP,UINT_TO_FP and FTRUNC.
llvm-svn: 233681
|
| |
|
|
|
|
| |
No functional change intended.
llvm-svn: 233639
|
| |
|
|
|
|
|
|
| |
Generate tables in the .xdata section representing what actions to take
when an exception is thrown. This currently fills in state for
cleanups, catch handlers are still unfinished.
llvm-svn: 233636
|
| |
|
|
|
|
| |
Update lib/CodeGen (and lib/Target) to use the new `DebugLoc` API.
llvm-svn: 233582
|
| |
|
|
| |
llvm-svn: 233577
|
| |
|
|
| |
llvm-svn: 233498
|
| |
|
|
| |
llvm-svn: 233495
|
| |
|
|
|
|
| |
DAGCombiner::ReassociateOps was correctly testing for an constant integer scalar but failed to correctly test for constant integer vectors (it was testing for any constant vector).
llvm-svn: 233482
|
| |
|
|
| |
llvm-svn: 233427
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Tailcalls are only OK with forwarded sret pointers. With explicit sret,
one approximation is to check that the pointer isn't an Instruction, as
in that case it might point into some local memory (alloca). That's not
OK with tailcalls.
Explicit sret counterpart to r233409.
Differential Revison: http://reviews.llvm.org/D8510
llvm-svn: 233410
|
| |
|
|
|
|
|
|
|
| |
Tailcalls are only OK with forwarded sret pointers. With sret demotion,
they're not, as we'd have a pointer into a soon-to-be-dead stack frame.
Differential Revison: http://reviews.llvm.org/D8510
llvm-svn: 233409
|
| |
|
|
| |
llvm-svn: 233392
|
| |
|
|
|
|
| |
This was discussed a while back and I left it optional for migration. Since it's been far more than the 'week or two' that was discussed, time to actually make this manditory.
llvm-svn: 233357
|
| |
|
|
|
|
|
|
|
|
| |
This patch adds support for explicitly provided spill slots in the GC arguments of a gc.statepoint. This is somewhat analogous to gcroot, but leverages the STATEPOINT MI node and StackMap infrastructure. The motivation for this is:
1) The stack spilling code for gc.statepoints hasn't advanced as fast as I'd like. One major option is to give up on doing spilling in the backend and do it at the IR level instead. We'd give up the ability to have gc values in registers, but that's a minor cost in practice. We are not neccessarily moving in that direction, but having the ability to prototype such a thing cheaply is interesting.
2) I want to port the gcroot lowering to use the statepoint infastructure. Given the metadata printers for gcroot expect a fixed set of stack roots, it's easiest to just reuse the explicit stack slots and pass them directly to the underlying statepoint.
I'm holding off on the documentation for the new feature until I'm reasonable sure this is going to stick around.
llvm-svn: 233356
|
| |
|
|
|
|
|
|
| |
We don't have any logic to emit those tables yet, so the SDAG lowering
of this intrinsic is just a stub. We can see the intrinsic in the
prepared IR, though.
llvm-svn: 233354
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It can happen (by line CurSU->isPending = true; // This SU is not in
AvailableQueue right now.) that a SUnit is mark as available but is
not in the AvailableQueue. For SUnit being selected for scheduling
both conditions must be met.
This patch mainly defensively protects from invalid removing a node
from a queue. Sometimes nodes are marked isAvailable but are not in
the queue because they have been defered due to some hazard.
Patch by Pawel Bylica!
llvm-svn: 233351
|
| |
|
|
|
|
| |
Also, make the assumption explicit in the header.
llvm-svn: 233329
|
| |
|
|
| |
llvm-svn: 233294
|
| |
|
|
| |
llvm-svn: 233293
|
| |
|
|
| |
llvm-svn: 233288
|
| |
|
|
|
|
|
|
|
|
| |
This patch adds supports for the vector constant folding of TRUNCATE and FP_EXTEND instructions and tidies up the SINT_TO_FP and UINT_TO_FP instructions to match.
It also moves the vector constant folding for the FNEG and FABS instructions to use the DAG.getNode() functionality like the other unary instructions.
Differential Revision: http://reviews.llvm.org/D8593
llvm-svn: 233224
|
| |
|
|
|
|
|
|
| |
We don't have any logic to emit those tables yet, so the sdag lowering
of this intrinsic is just a stub. We can see the intrinsic in the
prepared IR, though.
llvm-svn: 233209
|
| |
|
|
|
|
|
|
|
| |
Reverts the code change from r221168 and the relevant test.
It was a mistake to disable the combiner, and based on the ultimate
definition of 'optnone' we shouldn't have considered the test case
as failing in the first place.
llvm-svn: 233153
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as sitofp
While the uitofp scalar constant folding treats an integer as an unsigned value (from lang ref):
%X = sitofp i8 -1 to double ; yields double:-1.0
%Y = uitofp i8 -1 to double ; yields double:255.0
The vector constant folding was always using sitofp:
%X = sitofp <2 x i8> <i8 -1, i8 -1> to <2 x double> ; yields <double -1.0, double -1.0>
%Y = uitofp <2 x i8> <i8 -1, i8 -1> to <2 x double> ; yields <double -1.0, double -1.0>
This patch fixes this so that the correct opcode is used for sitofp and uitofp.
%X = sitofp <2 x i8> <i8 -1, i8 -1> to <2 x double> ; yields <double -1.0, double -1.0>
%Y = uitofp <2 x i8> <i8 -1, i8 -1> to <2 x double> ; yields <double 255.0, double 255.0>
Differential Revision: http://reviews.llvm.org/D8560
llvm-svn: 233033
|
| |
|
|
| |
llvm-svn: 232998
|
| |
|
|
|
|
| |
NFC.
llvm-svn: 232944
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fixing sign extension in makeLibCall for MIPS64. In MIPS64 architecture all
32 bit arguments (int, unsigned int, float 32 (soft float)) must be sign
extended. This fixes test "MultiSource/Applications/oggenc/".
Patch by Strahinja Petrovic.
Differential Revision: http://reviews.llvm.org/D7791
llvm-svn: 232943
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Because the operands of a vector SETCC node can be of a different type from the
result (and often are), it can happen that even if we'd prefer to widen the
result type of the SETCC, the operands have been split instead. In this case,
the SETCC result also must be split. This mirrors what is done in
WidenVecRes_SELECT, and should be NFC elsewhere because if the operands are not
widened the following calls to GetWidenedVector will assert (which is what was
happening in the test case).
llvm-svn: 232935
|
| |
|
|
| |
llvm-svn: 232831
|
| |
|
|
| |
llvm-svn: 232830
|