| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
findScratchNonCalleeSaveRegister() just needs a simple liveness
analysis, use LivePhysRegs for that as it is simpler and does not depend
on the kill flags.
This commit adds a convenience function available() to LivePhysRegs:
This function returns true if the given register is not reserved and
neither the register nor any of its aliases are alive.
Differential Revision: http://reviews.llvm.org/D21865
llvm-svn: 274685
|
| |
|
|
|
|
|
| |
We emitted debug info for globals/functions as if they all had external
linkage. Instead, emit local symbol records when appropriate.
llvm-svn: 274676
|
| |
|
|
|
|
|
| |
It is impossible to inherit from a union. We are missing a way to
represent this in IR for classes/structs...
llvm-svn: 274675
|
| |
|
|
|
|
|
|
|
|
| |
Now with a corrected test to account for a recently supported properties bit in the debug info of a struct.
Original review: http://reviews.llvm.org/D21939
This reverts commit 970c3fd497a28d25dd69526eb52594a696c37968.
llvm-svn: 274661
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This logic was introduced in r157663 and does not make any sense to me.
The motivating example in rdar://11538365 looks like this:
This is the tail:
BB#16: derived from LLVM BB %if.end68
Live Ins: %R0 %R4 %R5
Predecessors according to CFG: BB#15 BB#5
tBLXi pred:14, pred:%noreg, <ga:@CFRelease>, %R0<kill>, <regmask>, %LR<imp-def,dead>, %SP<imp-use>, %SP<imp-def>
t2B <BB#20>, pred:14, pred:%noreg
Successors according to CFG: BB#20
This is the predBB:
BB#5:
Live Ins: %R5
Predecessors according to CFG: BB#4
%R4<def> = t2MOVi 0, pred:14, pred:%noreg, opt:%noreg
t2B <BB#16>, pred:14, pred:%noreg
Successors according to CFG: BB#16
However this is invalid machine code to begin with, if %R0 is live-in to
BB#16 then it must be live-in to BB#5 as well if BB#5 does not define
it. We should not need logic to retroactively fix broken machine code
and in fact the example from r157663 passes cleanly with the code
removed and I do not see any (newly) failing tests with the machine
verifier enabled.
Differential Revision: http://reviews.llvm.org/D22031
llvm-svn: 274655
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
findBetterNeighborChains doesn't actually CombineTo it.
Summary:
findBetterNeighborChains may or may not find a better chain for each node it finds, which include the node ("St") that visitSTORE is currently processing. If no better chain is found for St, visitSTORE should continue instead of return SDValue(St, 0), as if it's CombinedTo'ed.
This fixes bug 28130. There might be other ways to make the test pass (see D21409). I think both of the patches are fixing actual bugs revealed by the same testcase.
Reviewers: echristo, wschmidt, hfinkel, kbarton, amehsan, arsenm, nemanjai, bogner
Subscribers: mehdi_amini, nemanjai, llvm-commits
Differential Revision: http://reviews.llvm.org/D21692
llvm-svn: 274644
|
| |
|
|
|
|
| |
This reverts commit 256b29322c827a2d94da56468c936596f5509032.
llvm-svn: 274632
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D21939
llvm-svn: 274629
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
StratifiedSets (as implemented) is very fast, but its accuracy is also
limited. If we take a more aggressive andersens-like approach, we can be
way more accurate, but we'll also end up being slower.
So, we've decided to split CFLAA into CFLSteensAA and CFLAndersAA.
Long-term, we want to end up in a place where CFLSteens is queried
first; if it can provide an answer, great (since queries are basically
map lookups). Otherwise, we'll fall back to CFLAnders, BasicAA, etc.
This patch splits everything out so we can try to do something like
that when we get a reasonable CFLAnders implementation.
Patch by Jia Chen.
Differential Revision: http://reviews.llvm.org/D21910
llvm-svn: 274589
|
| |
|
|
|
|
|
| |
This reverts commit r259387 because it inserts illegal code after legalization
in some backends where i64 OR type is illegal for example.
llvm-svn: 274573
|
| |
|
|
|
|
|
| |
This only really matters when the index is non-constant since the
constant case already gets taken care of by other combines.
llvm-svn: 274569
|
| |
|
|
| |
llvm-svn: 274497
|
| |
|
|
|
|
|
|
|
|
| |
concatenation of the inputs more general purpose.
We can now handle concatenation of each source multiple times. The previous code just checked for each source to appear once in either order.
This also now handles an entire source vector sized piece having undef indices correctly. We now concat with UNDEF instead of using one of the sources. This is responsible for the test case change.
llvm-svn: 274483
|
| |
|
|
|
|
|
|
| |
handle undef indices.
Undef indices can now be treated as zeros. Or if its undef ORed with zero, we will keep the undef.
llvm-svn: 274472
|
| |
|
|
|
|
|
|
|
|
| |
After the block placement, if a block ends with a conditional branch, but the
next block is not its successor. The conditional branch should be changed to
unconditional branch. This patch fixes PR28307, PR28297, PR28402.
Differential Revision: http://reviews.llvm.org/D21811
llvm-svn: 274470
|
| |
|
|
|
|
| |
These are set on both the declaration record and the definition record.
llvm-svn: 274410
|
| |
|
|
|
|
|
| |
The main problem was counting comments on their own
line as instructions.
llvm-svn: 274405
|
| |
|
|
|
|
| |
Allow implicit defs
llvm-svn: 274402
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Given something like:
struct S {
int a;
struct { int b; };
};
We would fail to give 'b' offset 4. Instead, we would give it the
offset it has inside of it's struct.
llvm-svn: 274400
|
| |
|
|
|
|
|
|
| |
A namespace without a name should be written out as `anonymous
namespace' while a tag type without a name should be written out as
<unnamed-tag>.
llvm-svn: 274399
|
| |
|
|
|
|
|
|
| |
MSVC makes up names for these anonymous structs, but we don't (yet).
Eventually Clang should use getTypedefNameForAnonDecl() to put some name
in the debug info, and we can update the test case when that happens.
llvm-svn: 274391
|
| |
|
|
|
|
|
|
|
|
|
| |
We were asserting that our type records were valid when emitting
assembly, but not when emitting an object file.
I've been seeing lots of LNK1285 errors (corrupt PDB) during incremental
debug self-host builds with the MSVC linker, and hopefully this will
catch some of them earlier.
llvm-svn: 274373
|
| |
|
|
|
|
|
| |
Remove a few more implicit iterator to pointer conversions by preferring
MachineInstr&.
llvm-svn: 274363
|
| |
|
|
|
|
|
| |
Avoid implicit conversions from MachineBasicBlock::iterator to
MachineInstr* in TargetInstrInfo.
llvm-svn: 274361
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Use MachineInstr& to avoid implicit conversions from
MachineBasicBlock::iterator to MachineInstr*. In one case, this could
use a range-based for loop, but the other loops iterated in reverse
order.
One of the reverse-loops checked the MachineInstr* for nullptr, a
condition that is provably unreachable. (And even if my proof has a
flaw, UBSan would catch the bug.)
llvm-svn: 274360
|
| |
|
|
|
|
|
| |
Avoid an unnecessary (and implicit) iterator to pointer conversion in
UnreachableBlockElim by using the post-increment operator.
llvm-svn: 274355
|
| |
|
|
|
|
|
| |
Avoid implicit conversions from iterator to pointer by preferring
MachineInstr& and using range-based for loops.
llvm-svn: 274354
|
| |
|
|
|
|
|
|
|
| |
Use MachineInstr& instead of MachineInstr* in RegAllocFast to avoid
implicit conversions from MachineInstrBundleIterator. RAFast::spillAll
and RAFast::spillVirtReg still take iterators, since their argument may
be an end iterator from MachineBasicBlock::getFirstTerminator.
llvm-svn: 274353
|
| |
|
|
|
|
| |
ArrayRef argument and its begin/end iterators. Also use 'int' type for number of elements and loop iterators to remove several typecasts. No functional change intended.
llvm-svn: 274338
|
| |
|
|
|
|
|
|
| |
pointer to a mask array. Convert all callers to use the ArrayRef version. No functional change intended.
For the most part this simplifies all callers. There were two places in X86 that needed an explicit makeArrayRef to shorten a statically sized array.
llvm-svn: 274337
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Group" sections while lowering. In particular, for ELF sections this is
useful for creating function-specific groups that get merged into the
same named section.
Also use const Twine& instead of StringRef for the getELF functions
while we're here.
Differential Revision: http://reviews.llvm.org/D21743
llvm-svn: 274336
|
| |
|
|
| |
llvm-svn: 274335
|
| |
|
|
|
|
|
| |
Make worklist and ehworklist member of the
class so that they don't need to be passed around.
llvm-svn: 274333
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This represents the adjustment applied to the implicit 'this' parameter
in the prologue of a virtual method in the MS C++ ABI. The adjustment is
always zero unless multiple inheritance is involved.
This increases the size of DISubprogram by 8 bytes, unfortunately. The
adjustment really is a signed 32-bit integer. If this size increase is
too much, we could probably win it back by splitting out a subclass with
info specific to virtual methods (virtuality, vindex, thisadjustment,
containingType).
Reviewers: aprantl, dexonsmith
Subscribers: aaboud, amccarth, llvm-commits
Differential Revision: http://reviews.llvm.org/D21614
llvm-svn: 274325
|
| |
|
|
|
|
|
|
|
| |
Change all the methods in LiveVariables that expect non-null
MachineInstr* to take MachineInstr& and update the call sites. This
clarifies the API, and designs away a class of iterator to pointer
implicit conversions.
llvm-svn: 274319
|
| |
|
|
| |
llvm-svn: 274317
|
| |
|
|
|
|
| |
Remove another unnecessary iterator to pointer conversion.
llvm-svn: 274315
|
| |
|
|
|
|
|
|
| |
Convert a loop to a range-based for, using MachineInstr& instead of
MachineInstr* and removing an implicit conversion from iterator to
pointer.
llvm-svn: 274311
|
| |
|
|
|
|
|
|
|
| |
Use MachineInstr& over MachineInstr* to avoid implicit iterator to
pointer conversions. MachineInstr*-as-nullptr was being used as a flag
for whether the for loop terminated normally; I added an explicit `bool`
instead.
llvm-svn: 274310
|
| |
|
|
|
|
|
|
|
|
| |
TargetSubtargetInfo::overrideSchedPolicy takes two MachineInstr*
arguments (begin and end) that invite implicit conversions from
MachineInstrBundleIterator. One option would be to change their type to
an iterator, but since they don't seem to have been used since the API
was added in 2010, I'm deleting the dead code.
llvm-svn: 274304
|
| |
|
|
|
|
|
| |
Use MachineInstr& instead of MachineInstr* in MachineSinker to help
avoid implicit conversions from iterator to pointer.
llvm-svn: 274303
|
| |
|
|
|
|
|
|
| |
Push MachineInstr& through helper APIs for consistency. This doesn't
remove any more implicit conversions, but it's a nice cleanup after
r274300.
llvm-svn: 274301
|
| |
|
|
|
|
| |
This avoids an implicit conversion from iterator to pointer.
llvm-svn: 274300
|
| |
|
|
|
|
|
| |
Avoid a number of implicit conversions from iterator to pointer by using
range-based for and MachineInstr&.
llvm-svn: 274298
|
| |
|
|
|
|
|
| |
Avoid an implicit iterator to pointer conversion in
LiveVariables::runOnBlock by switching to a range-based for.
llvm-svn: 274297
|
| |
|
|
|
|
| |
Avoid another few implicit conversions from iterator to pointer.
llvm-svn: 274295
|
| |
|
|
|
|
| |
Avoid another implicit conversion from iterator to pointer.
llvm-svn: 274294
|
| |
|
|
|
|
|
| |
Avoid another implicit conversion from MachineInstrBundleIterator to
MachineInstr* by using MachineInstr&.
llvm-svn: 274292
|
| |
|
|
|
|
|
|
| |
Switch to a range-based for in IfConverter::PredicateBlock and take
MachineInstr& in MaySpeculate to avoid an implicit conversion from
MachineBasicBlock::iterator to MachineInstr*.
llvm-svn: 274290
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is a mechanical change to make TargetLowering API take MachineInstr&
(instead of MachineInstr*), since the argument is expected to be a valid
MachineInstr. In one case, changed a parameter from MachineInstr* to
MachineBasicBlock::iterator, since it was used as an insertion point.
As a side effect, this removes a bunch of MachineInstr* to
MachineBasicBlock::iterator implicit conversions, a necessary step
toward fixing PR26753.
llvm-svn: 274287
|