| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
| |
__stack_chk_fail(). This avoids a compiler crash.
Differential Revision: http://reviews.llvm.org/D21818
llvm-svn: 274263
|
| |
|
|
|
|
|
| |
MC doesn't really care about CodeGen stuff, so this was just
complicating target initialization.
llvm-svn: 274258
|
| |
|
|
| |
llvm-svn: 274251
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
MSVC provide exception handlers with enhanced information to deal with security buffer feature (/GS).
To be more secure, the security cookies (GS and SEH) are validated when unwinding the stack.
The following code:
```
void f() {}
void foo() {
__try {
f();
} __except(1) {
f();
}
}
```
Reviewers: majnemer, rnk
Subscribers: thakis, llvm-commits, chrisha
Differential Revision: http://reviews.llvm.org/D21101
llvm-svn: 274239
|
| |
|
|
| |
llvm-svn: 274225
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
CodeView need to know the offset of the storage allocation for a
bitfield. Encode this via the "extraData" field in DIDerivedType and
introduced a new flag, DIFlagBitField, to indicate whether or not a
member is a bitfield.
This fixes PR28162.
Differential Revision: http://reviews.llvm.org/D21782
llvm-svn: 274200
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- Use range based for loops
- No need for some !Reg checks: isPhysicalRegister() reports false for
NoRegister anyway
- Do not repeat function name in documentation comment.
- Do not repeat documentation comment in implementation when we already
have one at the declaration.
- Factor some common subexpressions out.
- Change file comments to use doxygen syntax.
llvm-svn: 274194
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is mostly a mechanical change to make TargetInstrInfo API take
MachineInstr& (instead of MachineInstr* or MachineBasicBlock::iterator)
when the argument is expected to be a valid MachineInstr. This is a
general API improvement.
Although it would be possible to do this one function at a time, that
would demand a quadratic amount of churn since many of these functions
call each other. Instead I've done everything as a block and just
updated what was necessary.
This is mostly mechanical fixes: adding and removing `*` and `&`
operators. The only non-mechanical change is to split
ARMBaseInstrInfo::getOperandLatencyImpl out from
ARMBaseInstrInfo::getOperandLatency. Previously, the latter took a
`MachineInstr*` which it updated to the instruction bundle leader; now,
the latter calls the former either with the same `MachineInstr&` or the
bundle leader.
As a side effect, this removes a bunch of MachineInstr* to
MachineBasicBlock::iterator implicit conversions, a necessary step
toward fixing PR26753.
Note: I updated WebAssembly, Lanai, and AVR (despite being
off-by-default) since it turned out to be easy. I couldn't run tests
for AVR since llc doesn't link with it turned on.
llvm-svn: 274189
|
| |
|
|
|
|
|
|
|
| |
- Use range based for
- Use the more common variable names MBB and MF for
MachineBasicBlock/MachineFunction variables.
- Add a few const modifiers
llvm-svn: 274187
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a fix for PR27842.
An IR-level implementation of stack coloring tailored to work with
SafeStack. It is a bit weaker than the MI implementation in that it
does not the "lifetime start at first access" logic. This can be
improved in the future.
This patch also replaces the naive implementation of stack frame
layout with a greedy algorithm that can split existing stack slots
and even fit small objects inside the alignment padding of other
objects.
llvm-svn: 274162
|
| |
|
|
|
|
| |
vectors where the zero vector is the first operand to the shuffle instead of the second.
llvm-svn: 274097
|
| |
|
|
|
|
| |
instead of SmallVectorImpl. NFC.
llvm-svn: 274095
|
| |
|
|
| |
llvm-svn: 274075
|
| |
|
|
|
|
|
|
|
| |
I think this converts all the simple cases that really just care about
the generated code being position independent or not. The remaining
uses are a bit more complicated and are checking things like "is this
a library or executable" or "can this symbol be preempted".
llvm-svn: 274055
|
| |
|
|
| |
llvm-svn: 274051
|
| |
|
|
| |
llvm-svn: 274007
|
| |
|
|
|
|
|
|
|
|
| |
This patch enhances dot graph viewer to show hot regions
with hot bbs/edges displayed in red. The ratio of the bb
freq to the max freq of the function needs to be no less
than the value specified by view-hot-freq-percent option.
The default value is 10 (i.e. 10%).
llvm-svn: 273996
|
| |
|
|
|
|
|
|
|
| |
MBFI supports profile count dumping and function
name based filtering. Add these two feature to
BFI as well. The filtering option is shared between
BFI and MBFI: -view-bfi-func-name=..
llvm-svn: 273992
|
| |
|
|
|
|
|
|
|
|
|
| |
BFI and MBFI's dot traits class share most of the
code and all future enhancement. This patch extracts
common implementation into base class BFIDOTGraphTraitsBase.
This patch also enables BFI graph to show branch probability
on edges as MBFI does before.
llvm-svn: 273990
|
| |
|
|
|
|
|
|
| |
Expose getBPI interface from BFI impl and use
it in graph viewer. This eliminates the dependency
on old PM interface.
llvm-svn: 273967
|
| |
|
|
|
|
| |
Should fix the shared library build.
llvm-svn: 273958
|
| |
|
|
|
|
| |
Fixes a fixme about handling other visibilities.
llvm-svn: 273921
|
| |
|
|
| |
llvm-svn: 273909
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main issue here is that the "thumb" flag wasn't set for some of these
sections, making MSVC's link.exe fails to correctly relocate code
against the symbols inside these sections. link.exe could fail for
instance with the "fixup is not aligned for target 'XX'" error. If
linking doesn't fail, the relocation process goes wrong in the end and
invalid code is generated by the linker.
This patch adds Thumb/ARM information so that the right flags are set
on COFF/Windows.
Patch by Adrien Guinet.
llvm-svn: 273880
|
| |
|
|
|
|
| |
Use it in ppc too.
llvm-svn: 273877
|
| |
|
|
| |
llvm-svn: 273830
|
| |
|
|
| |
llvm-svn: 273828
|
| |
|
|
| |
llvm-svn: 273826
|
| |
|
|
| |
llvm-svn: 273815
|
| |
|
|
| |
llvm-svn: 273810
|
| |
|
|
| |
llvm-svn: 273809
|
| |
|
|
|
|
|
|
|
|
|
| |
Added support for:
1. Multi dimension array.
2. Array of structure type, which previously was declared incompletely.
3. Dynamic size array.
Differential Revision: http://reviews.llvm.org/D21526
llvm-svn: 273807
|
| |
|
|
| |
llvm-svn: 273802
|
| |
|
|
|
|
| |
This reverts commit r273778, it seems to break UBSan :/
llvm-svn: 273779
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SimplifyCFG had logic to insert calls to llvm.trap for two very
particular IR patterns: stores and invokes of undef/null.
While InstCombine canonicalizes certain undefined behavior IR patterns
to stores of undef, phase ordering means that this cannot be relied upon
in general.
There are much better tools than llvm.trap: UBSan and ASan.
N.B. I could be argued into reverting this change if a clear argument as
to why it is important that we synthesize llvm.trap for stores, I'd be
hard pressed to see why it'd be useful for invokes...
llvm-svn: 273778
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Remember the last choice for the top/bottom scheduling boundary in
bidirectional scheduling mode. The top choice should not change if we
schedule at the bottom and vice versa.
This allows us to improve compiletime: We only recalculate the best pick
for one border and re-use the cached top-pick from the other border.
Differential Revision: http://reviews.llvm.org/D19350
llvm-svn: 273766
|
| |
|
|
|
|
|
|
|
|
| |
In bidirectional scheduling this gives more stable results than just
comparing the "reason" fields of the top/bottom node because the reason
field may be higher depending on what other nodes are in the queue.
Differential Revision: http://reviews.llvm.org/D19401
llvm-svn: 273755
|
| |
|
|
| |
llvm-svn: 273744
|
| |
|
|
|
|
|
|
|
|
|
| |
>32 bits.
This fixes an embarrassing bug when emitting .debug_loc entries for 64-bit+ constants,
which were previously silently truncated to 32 bits.
<rdar://problem/26843232>
llvm-svn: 273736
|
| |
|
|
| |
llvm-svn: 273713
|
| |
|
|
|
|
|
|
| |
use operands."
as it caused PR28295.
llvm-svn: 273707
|
| |
|
|
|
|
| |
This makes it slightly more powerful for dynamic-no-pic.
llvm-svn: 273704
|
| |
|
|
|
|
|
|
|
| |
Tail merge was making the assumption that a layout successor or
predecessor was always a cfg successor/predecessor. Remove that
assumption. Changes to tests are necessary because the errant cfg edges
were preventing optimizations.
llvm-svn: 273700
|
| |
|
|
|
|
|
|
|
|
| |
Clang emits them in reverse order to conform to the ABI, which requires
left-to-right destruction. As a result, the order doesn't fall out
naturally, and we have to sort things out in the backend.
Fixes PR28213
llvm-svn: 273696
|
| |
|
|
| |
llvm-svn: 273690
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are two remaining issues here:
1. No vbptr information
2. Need to mention indirect virtual bases
Getting indirect virtual bases is just a matter of adding an "indirect"
flag, emitting them in the frontend, and ignoring them when appropriate
for DWARF.
All virtual bases use the same artificial vbptr field, so I think the
vbptr offset will be best represented by an implicit __vbptr$ClassName
member similar to our existing __vptr$ member.
llvm-svn: 273688
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D21657
llvm-svn: 273678
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D21655
llvm-svn: 273626
|
| |
|
|
|
|
|
| |
Do not dump intermediate state of the pending queue anymore now that we
always dump the final state before picking.
llvm-svn: 273618
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When considering whether to split an instruction with a memory operand
into an explicit load and a register-based instruction, we currently
check that the resulting instruction has exactly 1 def. This prevents 2
important LICM optimizations: compares with memory operands, and double
indirect calls. All the tests and the test-suite pass without the check.
My guess as to original intent is to limit the additional register pressure
created by the new instruction, but given that we only split out a single
register, it is already limited.
The licm-dominance test now checks actual memory loads for hoisting instead of
undef, and it tests compares.
hoist-invariant-load.ll now checks for 2 hoists, the intended hoist, and a bonus
from calling a got-relative function in a loop.
llvm-svn: 273616
|