| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Remove some typedefs in preparation for factoring out attachment logic
from `Instruction`.
llvm-svn: 235764
|
| |
|
|
|
|
|
| |
Rename `MetadataStore` to the more explicit `InstructionMetadata`. This
will make room for `FunctionMetadata` (start of PR23340).
llvm-svn: 235763
|
| |
|
|
|
|
|
|
|
|
| |
the invoke instruction
Same as r235145 for the call instruction - the justification, tradeoffs,
etc are all the same. The conversion script worked the same without any
false negatives (after replacing 'call' with 'invoke').
llvm-svn: 235755
|
| |
|
|
|
|
|
| |
AsmPrinter owns the OutStreamer, so an owning pointer makes sense here. Using a
reference for this is crufty.
llvm-svn: 235752
|
| |
|
|
| |
llvm-svn: 235735
|
| |
|
|
| |
llvm-svn: 235734
|
| |
|
|
| |
llvm-svn: 235729
|
| |
|
|
|
|
|
| |
This means we don't have to RAUW the landingpad instruction and
landingpad BB, which is a nice win.
llvm-svn: 235725
|
| |
|
|
| |
llvm-svn: 235723
|
| |
|
|
|
|
| |
Suggestion from David Blaikie!
llvm-svn: 235721
|
| |
|
|
| |
llvm-svn: 235719
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Perform integer extension only when the destination type is one of
i8, i16 & i32 and when the source type is i1, i8 or i16. For other
combinations we fall back to SelectionDAG.
This fixes the test MultiSource/Benchmarks/7zip that was failing in our
out-of-tree MIPS buildbots.
Reviewers: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9243
llvm-svn: 235718
|
| |
|
|
|
|
| |
call has no side effects, deleting) with MSVC.
llvm-svn: 235717
|
| |
|
|
|
|
|
|
|
|
| |
insert/extract/shuffle
Added some additional checking for vector types + tests.
Bug found with AFL fuzz.
llvm-svn: 235710
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Constant folding of extractelement with out-of-bound index produces undef also for indexes bigger than 64bit (instead of crash assert failure as before)
Test Plan: Unit tests included.
Reviewers: majnemer
Reviewed By: majnemer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9225
llvm-svn: 235700
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This patch fixes step D4 of Knuth's division algorithm implementation. Negative sign of the step result was not always detected due to incorrect "borrow" handling.
Test Plan: Unit test that reveals the bug included.
Reviewers: chandlerc, yaron.keren
Reviewed By: yaron.keren
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9196
llvm-svn: 235699
|
| |
|
|
| |
llvm-svn: 235697
|
| |
|
|
| |
llvm-svn: 235696
|
| |
|
|
|
|
|
|
| |
We should skip vector types which are not SCEVable.
test/CodeGen/NVPTX/sched2.ll passes
llvm-svn: 235695
|
| |
|
|
|
|
| |
Seems breaking builds
llvm-svn: 235690
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Fixes a bug in the NVPTX codegen. The code used to miss necessary "generic()"
on aggregates of addrspacecasts.
Test Plan: addrspacecast-gvar.ll
Reviewers: eliben, jholewinski
Reviewed By: jholewinski
Subscribers: jholewinski, llvm-commits
Differential Revision: http://reviews.llvm.org/D9130
llvm-svn: 235689
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
We run NaryReassociate right after SLSR because SLSR enables many
opportunities for NaryReassociate. For example, in nary-slsr.ll
foo((a + b) + c);
foo((a + b * 2) + c);
foo((a + b * 3) + c); // 2 muls and 6 adds
after SLSR:
ab = a + b;
foo(ab + c);
ab2 = ab + b;
foo(ab2 + c);
ab3 = ab2 + b;
foo(ab3 + c); // 6 adds
after NaryReassociate:
abc = (a + b) + c;
foo(abc);
ab2c = abc + b;
foo(ab2c);
ab3c = ab2c + b;
foo(ab3c); // 4 adds
Test Plan: nary-slsr.ll
Reviewers: jholewinski, eliben
Reviewed By: eliben
Subscribers: jholewinski, llvm-commits
Differential Revision: http://reviews.llvm.org/D9066
llvm-svn: 235688
|
| |
|
|
|
|
| |
Copy the kill flags when swapping the operands.
llvm-svn: 235687
|
| |
|
|
|
|
|
| |
This enables the rematerialization of some R600 MOV instructions in the
RegisterCoalescer and adds a testcase for r235668.
llvm-svn: 235675
|
| |
|
|
| |
llvm-svn: 235674
|
| |
|
|
|
|
|
| |
The target hooks should have already checked them. This change is
necessary to enable the remateriailzation on R600.
llvm-svn: 235673
|
| |
|
|
| |
llvm-svn: 235672
|
| |
|
|
|
|
|
| |
This should be fixed to properly understand all rematerializable
instructions while ignoring implicit reads of exec.
llvm-svn: 235671
|
| |
|
|
|
|
|
|
|
| |
Currently symbol names are printed in quotes if it contains something
outside of the arbitrary set of characters that isAcceptableChar tests
for. On somem targets, it is never OK to print a symbol name in quotes
so allow targets to opt out of this behavior.
llvm-svn: 235670
|
| |
|
|
|
|
|
|
|
|
|
| |
rematerializations
I couldn't provide a testcase as none of the public targets has wide
register classes with alot of subregisters and at the same time an
instruction which "ReMaterializable" and "AsCheapAsAMove" (could
probably be added for R600).
llvm-svn: 235668
|
| |
|
|
|
|
|
|
|
|
| |
WinEHPrepare works"
This reverts commit r235617.
r235649 should have addressed the problems.
llvm-svn: 235667
|
| |
|
|
|
|
|
| |
Match binutils by supporting the optional register name prefix for new vector
registers ("vs" for VSX registers and "q" for QPX registers).
llvm-svn: 235665
|
| |
|
|
|
|
|
| |
So long as the choice between printing msync and sync is not ambiguous, we can
print 'sync 0' and just 'sync'.
llvm-svn: 235663
|
| |
|
|
| |
llvm-svn: 235662
|
| |
|
|
|
|
|
| |
Maybe there is a better wording, but at least it should be technically
correct now.
llvm-svn: 235660
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add assembler/disassembler support for dcbt/dcbtst (and aliases) with the hint
field specified (non-zero). Unforunately, the syntax for this instruction is
special in that it differs for server vs. embedded cores:
dcbt ra, rb, th [server]
dcbt th, ra, rb [embedded]
where th can be omitted when it is 0. dcbtst is the same. Thus we need to play
games in the parser and the printer to flip the operands around on the embedded
cores. We'll use the server syntax as the default (binutils currently uses the
embedded form by default, but IBM is changing that).
We also stop marking dcbtst as having unmodeled side effects (this is not
necessary, it is just a hint like dcbt -- noticed by inspection, so no separate
test case).
llvm-svn: 235657
|
| |
|
|
| |
llvm-svn: 235656
|
| |
|
|
| |
llvm-svn: 235652
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PointerType::getElementType for a few cases of CallInst
(reverted in r235533)
Original commit message:
"Calls to llvm::Value::mutateType are becoming extra-sensitive now that
instructions have extra type information that will not be derived from
operands or result type (alloca, gep, load, call/invoke, etc... ). The
special-handling for mutateType will get more complicated as this work
continues - it might be worth making mutateType virtual & pushing the
complexity down into the classes that need special handling. But with
only two significant uses of mutateType (vectorization and linking) this
seems OK for now.
Totally open to ideas/suggestions/improvements, of course.
With this, and a bunch of exceptions, we can roundtrip an indirect call
site through bitcode and IR. (a direct call site is actually trickier...
I haven't figured out how to deal with the IR deserializer's lazy
construction of Function/GlobalVariable decl's based on the type of the
entity which means looking through the "pointer to T" type referring to
the global)"
The remapping done in ValueMapper for LTO was insufficient as the types
weren't correctly mapped (though I was using the post-mapped operands,
some of those operands might not have been mapped yet so the type
wouldn't be post-mapped yet). Instead use the pre-mapped type and
explicitly map all the types.
llvm-svn: 235651
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were asserting on code like this:
extern "C" unsigned long _exception_code();
void might_crash(unsigned long);
void foo() {
__try {
might_crash(0);
} __except(1) {
might_crash(_exception_code());
}
}
Gtest and many other libraries get the exception code from the __except
block. What's supposed to happen here is that EAX is live into the
__except block, and it contains the exception code. Eventually we'll
represent that as a use of the landingpad ehptr value, but for now we
can replace it with undef.
llvm-svn: 235649
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
remove copies that are useful after breaking some hardware dependencies.
In other words, handle this kind of situations conservatively by assuming reg2
is redefined by the undef flag.
reg1 = copy reg2
= inst reg2<undef>
reg2 = copy reg1
Copy propagation used to remove the last copy.
This is incorrect because the undef flag on reg2 in inst, allows next
passes to put whatever trashed value in reg2 that may help.
In practice we end up with this code:
reg1 = copy reg2
reg2 = 0
= inst reg2<undef>
reg2 = copy reg1
This fixes PR21743.
llvm-svn: 235647
|
| |
|
|
| |
llvm-svn: 235646
|
| |
|
|
| |
llvm-svn: 235645
|
| |
|
|
|
|
|
|
|
|
|
| |
When the base register index of the vector plus the constant offset
was less than zero, we were passing the wrong base register to the indirect
addressing instruction.
In this case, we need to set the base register to v0 and then add
the computed (negative) index to m0.
llvm-svn: 235641
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The order in which branches appear in ImmBranches is approximately their
order within the function body. By visiting later branches first, we reduce
the distance between earlier forward branches and their targets, making it
more likely that the cbn?z optimization, which can only apply to forward
branches, will succeed for those earlier branches.
Differential Revision: http://reviews.llvm.org/D9185
llvm-svn: 235640
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In particular, this preserves the kill flag, which allows the Thumb2 cbn?z
optimization to be applied in cases where a branch has been re-created after
the live variables analysis pass, e.g. by the machine block placement pass.
This appears to be low risk; a number of other targets seem to already be
doing something similar, e.g. AArch64, PowerPC.
Differential Revision: http://reviews.llvm.org/D9184
llvm-svn: 235639
|
| |
|
|
|
|
|
|
|
|
|
| |
comparisons with zero.
This allows the constant island pass to lower these branches to cbn?z
instructions, resulting in a shorter instruction sequence.
Differential Revision: http://reviews.llvm.org/D9183
llvm-svn: 235638
|
| |
|
|
|
|
|
|
|
|
|
| |
all Thumb targets.
This makes it more likely that we can use the 16-bit push and pop instructions
on Thumb-2, saving around 4 bytes per function.
Differential Revision: http://reviews.llvm.org/D9165
llvm-svn: 235637
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This appears to have been introduced back in r76698 as part of an unrelated
change. I can find no official ARM documentation stating that Thumb-2 functions
require 4-byte alignment; in fact, ARM documentation appears to contradict
this (see, e.g., ARM Architecture Reference Manual Thumb-2 Supplement,
section 2.6.1: "Thumb-2 enforces 16-bit alignment on all instructions.").
Also remove code that sets alignment for ARM functions, which is redundant
with code in the MachineFunction constructor, and remove the hidden
-arm-align-constant-islands flag, which has been enabled by default since
r146739 (Dec 2011) and has probably received sufficient testing by now.
Differential Revision: http://reviews.llvm.org/D9138
llvm-svn: 235636
|
| |
|
|
|
|
| |
Patch by Aditya Nandakumar.
llvm-svn: 235635
|