| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
http://reviews.llvm.org/D9241
llvm-svn: 235754
|
| |
|
|
|
|
|
| |
AsmPrinter owns the OutStreamer, so an owning pointer makes sense here. Using a
reference for this is crufty.
llvm-svn: 235752
|
| |
|
|
| |
llvm-svn: 235738
|
| |
|
|
| |
llvm-svn: 235736
|
| |
|
|
| |
llvm-svn: 235735
|
| |
|
|
| |
llvm-svn: 235734
|
| |
|
|
|
|
| |
Tests were failing when built with -DLLVM_DEFAULT_TARGET_TRIPLE=i686-pc-windows-gnu.
llvm-svn: 235733
|
| |
|
|
|
|
|
|
|
|
|
|
| |
In CMake dependencies can be filenames or targets, and targets can't be filenames. The Ninja generator handles filename dependencies because it generates targets for every output file from a command. For example:
add_custom_command(OUTPUT foo.txt COMMAND touch foo.txt)
With the Ninja generator this generates a target foo.txt, but with the Makefile generator it doesn't. This is probably because Ninja explicitly requires these hard dependency ties, and Make just behaves oddly in general.
To fix this we need to make the tablegen actions depend on a target rather than a filename.
llvm-svn: 235732
|
| |
|
|
|
|
|
|
| |
Check that `@main` is calling `@foo2` (the renamed internal function),
not the `@foo` with external linkage that's been pulled in from the
override file.
llvm-svn: 235730
|
| |
|
|
| |
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: 235720
|
| |
|
|
| |
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 should make it clear under which narrow circumstances implicit
physreg uses are okay when rematerializing and prevent people from
accidentally allowing too much when overriding
isReallyTriviallyReMaterializable() even with the weaker assert in the
RegisterCoalescer.
llvm-svn: 235679
|
| |
|
|
|
|
|
| |
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
|