| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
| |
Update `lib/Linker` to handle `Function` metadata attachments. The
attachments stick with the function body.
llvm-svn: 235786
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add serialization support for function metadata attachments (added in
r235783). The syntax is:
define @foo() !attach !0 {
Metadata attachments are only allowed on functions with bodies. Since
they come before the `{`, they're not really part of the body; since
they require a body, they're not really part of the header. In
`LLParser` I gave them a separate function called from `ParseDefine()`,
`ParseOptionalFunctionMetadata()`.
In bitcode, I'm using the same `METADATA_ATTACHMENT` record used by
instructions. Instruction metadata attachments are included in a
special "attachment" block at the end of a `Function`. The attachment
records are laid out like this:
InstID (KindID MetadataID)+
Note that these records always have an odd number of fields. The new
code takes advantage of this to recognize function attachments (which
don't need an instruction ID):
(KindID MetadataID)+
This means we can use the same attachment block already used for
instructions.
This is part of PR23340.
llvm-svn: 235785
|
| |
|
|
|
|
|
|
| |
Add a verifier check that only functions with bodies have metadata
attachments. This should help catch bugs in frontends and
transformation passes. Part of PR23340.
llvm-svn: 235784
|
| |
|
|
|
|
|
|
| |
Add IR support for `Metadata` attachments. Assembly and bitcode support
will follow shortly, but for now we just have unit tests. This is part
of PR23340.
llvm-svn: 235783
|
| |
|
|
|
|
|
|
| |
Remove unused `PFS` variable and take the `Instruction` by reference.
(Not really related to PR23340, but might as well clean this up while
I'm here.)
llvm-svn: 235782
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
right scaling.
In the function canFoldInAddressingMode, VT is computed as the type of the
destination/source of a LOAD/STORE operations, instead of the memory type of the
operation.
On targets with a scaling factor on the offset of the LOAD/STORE operations, the
function may return false for actually valid cases. This may then prevent the
selection of profitable pre or post indexed load/store operations, and instead
select pre or post indexed load/store for unprofitable cases.
Patch by Francois de Ferriere <francois.de-ferriere@st.com>!
Differential Revision: http://reviews.llvm.org/D9146
llvm-svn: 235780
|
| |
|
|
|
|
| |
Make the code reusable for `Function` metadata attachments (PR23340).
llvm-svn: 235778
|
| |
|
|
|
|
| |
PointerType::getElementType
llvm-svn: 235777
|
| |
|
|
|
|
|
|
| |
Parameterize the separator for attachments, since `Function` metadata
attachments (PR23340) aren't going to use a `,` (comma). No real
functionality change.
llvm-svn: 235775
|
| |
|
|
|
|
|
|
| |
Collect metadata names once per `AssemblyWriter` instead of every time
we need to print some attachments. Just a drive-by; this caught my eye
while I was refactoring the code in r235772.
llvm-svn: 235774
|
| |
|
|
| |
llvm-svn: 235773
|
| |
|
|
|
|
|
| |
Refactor the code for printing `Instruction` metadata attachments so it
can be reused for `Function`.
llvm-svn: 235772
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
input type and use bit tests to check for holes
When using bit tests for hole checks, we call AddPredecessorToBlock to give the
phi node a value from the bit test block. This would break if we've
previously called removePredecessor on the default destination because the
switch is fully covered.
Test case by Mark Lacey.
llvm-svn: 235771
|
| |
|
|
|
|
|
|
| |
Make room for more than just `Function::isMaterializable()` in the
`GlobalObject` subclass data bitfield. Since we're treating it like a
bitfield, change `Function::Function()` to zero-out the whole thing.
llvm-svn: 235770
|
| |
|
|
|
|
|
|
|
|
|
| |
Extract the set logic for metadata attachments from `Instruction` so it
can be reused for `Function` (PR23340).
This data structure makes a `SmallVector<>` look (a little) like a map,
just doing the bare minimum to support the `Instruction` (and soon,
`Function`) metadata API.
llvm-svn: 235769
|
| |
|
|
|
|
|
|
|
| |
This introduces an intrinsic called llvm.eh.exceptioncode. It is lowered
by copying the EAX value live into whatever basic block it is called
from. Obviously, this only works if you insert it late during codegen,
because otherwise mid-level passes might reschedule it.
llvm-svn: 235768
|
| |
|
|
|
|
|
|
|
|
| |
Technically the operations are different -- the old logic moved items
from the back into the opened-up slots, instead of the usual
`remove_if()` logic of a slow and a fast iterator -- but unless a
profile tells us otherwise I prefer the simpler logic here. Regardless,
there shouldn't be an observable function change.
llvm-svn: 235767
|
| |
|
|
|
|
|
| |
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
|