| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
>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: 273734
|
| |
|
|
| |
llvm-svn: 273733
|
| |
|
|
|
|
| |
NFC (whitespace only change)
llvm-svn: 273732
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bitset metadata currently used in LLVM has a few problems:
1. It has the wrong name. The name "bitset" refers to an implementation
detail of one use of the metadata (i.e. its original use case, CFI).
This makes it harder to understand, as the name makes no sense in the
context of virtual call optimization.
2. It is represented using a global named metadata node, rather than
being directly associated with a global. This makes it harder to
manipulate the metadata when rebuilding global variables, summarise it
as part of ThinLTO and drop unused metadata when associated globals are
dropped. For this reason, CFI does not currently work correctly when
both CFI and vcall opt are enabled, as vcall opt needs to rebuild vtable
globals, and fails to associate metadata with the rebuilt globals. As I
understand it, the same problem could also affect ASan, which rebuilds
globals with a red zone.
This patch solves both of those problems in the following way:
1. Rename the metadata to "type metadata". This new name reflects how
the metadata is currently being used (i.e. to represent type information
for CFI and vtable opt). The new name is reflected in the name for the
associated intrinsic (llvm.type.test) and pass (LowerTypeTests).
2. Attach metadata directly to the globals that it pertains to, rather
than using the "llvm.bitsets" global metadata node as we are doing now.
This is done using the newly introduced capability to attach
metadata to global variables (r271348 and r271358).
See also: http://lists.llvm.org/pipermail/llvm-dev/2016-June/100462.html
Differential Revision: http://reviews.llvm.org/D21053
llvm-svn: 273729
|
| |
|
|
| |
llvm-svn: 273727
|
| |
|
|
|
|
| |
Patch by Lei Zhang!
llvm-svn: 273726
|
| |
|
|
|
|
| |
Passes should depend on CodeGen, as that contains some IR-to-IR passes.
llvm-svn: 273724
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This patch moves MSSA's caching walker into MemorySSA, and moves the
actual definition of MSSA's caching walker out of MemorySSA.h. This is
done in preparation for the new walker, which should be out for review
soonish.
Also, this patch removes a field from UpwardsMemoryQuery and has a few
lines of diff from clang-format'ing MemorySSA.cpp.
llvm-svn: 273723
|
| |
|
|
|
|
| |
This fixes PR28294.
llvm-svn: 273722
|
| |
|
|
|
|
| |
This patch adds round-trip support for MachO Universal binaries to obj2yaml and yaml2obj. Universal binaries have a header and list of architecture structures, followed by a the individual object files at specified offsets.
llvm-svn: 273719
|
| |
|
|
|
|
| |
The opcodes are used, but only by DAG->DAG.
llvm-svn: 273717
|
| |
|
|
| |
llvm-svn: 273716
|
| |
|
|
| |
llvm-svn: 273715
|
| |
|
|
| |
llvm-svn: 273713
|
| |
|
|
|
|
|
| |
We cannot remove an instruction with no uses just because
SimplifyInstruction succeeds. It may have side effects.
llvm-svn: 273711
|
| |
|
|
|
|
|
| |
Make sure strings don't get too big for a record, truncate them if
need-be.
llvm-svn: 273710
|
| |
|
|
|
|
| |
M1. (NFC)
llvm-svn: 273708
|
| |
|
|
|
|
|
|
| |
use operands."
as it caused PR28295.
llvm-svn: 273707
|
| |
|
|
|
|
|
|
|
| |
one code path (NFCI)
Tests to verify that the commuted variants are all exercised were added with:
http://reviews.llvm.org/rL273702
llvm-svn: 273706
|
| |
|
|
|
|
| |
This makes it slightly more powerful for dynamic-no-pic.
llvm-svn: 273704
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r273608.
Broke building code with sanitizers, where apparently these kinds of
loads, casts, and truncations are common:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/24502
http://crbug.com/623099
llvm-svn: 273703
|
| |
|
|
|
|
|
|
|
|
| |
one place; NFCI
By putting all the possible commutations together, we simplify the code.
Note that this is NFCI, but I'm adding tests that actually exercise each
commutation pattern because we don't have this anywhere else.
llvm-svn: 273702
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
allow
a good error message to be produced.
This is nearly the last libObject interface that used ErrorOr and the last one
that appears in llvm/include/llvm/Object/MachO.h . For Mach-O objects this is
just a clean up because it’s version of getSymbolAddress() can’t return an
error.
I will leave it to the experts on COFF and ELF to actually add meaning full
error messages in their tests if they wish. And also leave it to these experts
to change the last two ErrorOr interfaces in llvm/include/llvm/Object/ObjectFile.h
for createCOFFObjectFile() and createELFObjectFile() if they wish.
Since there are no test cases for COFF and ELF error cases with respect to
getSymbolAddress() in the test suite this is no functional change (NFC).
llvm-svn: 273701
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D21624
llvm-svn: 273692
|
| |
|
|
|
|
|
|
|
|
| |
We bailed out while printing codeview for an MSVC compiled
SemaExprCXX.cpp that used this record. The MS reference headers look
incorrect here, which is probably why we had this bug. They use a 32-bit
enum as the field type, but the actual record appears to use one byte
for the cookie kind followed by a flags byte.
llvm-svn: 273691
|
| |
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The interleaved access analysis currently assumes that the inserted run-time
pointer aliasing checks ensure the absence of dependences that would prevent
its instruction reordering. However, this is not the case.
Issues can arise from how code generation is performed for interleaved groups.
For a load group, all loads in the group are essentially moved to the location
of the first load in program order, and for a store group, all stores in the
group are moved to the location of the last store. For groups having members
involved in a dependence relation with any other instruction in the loop, this
reordering can violate the dependence.
This patch teaches the interleaved access analysis how to avoid breaking such
dependences, and should fix PR27626.
An assumption of the original analysis was that the accesses had been collected
in "program order". The analysis was then simplified by visiting the accesses
bottom-up. However, this ordering was never guaranteed for anything other than
single basic block loops. Thus, this patch also enforces the desired ordering.
Reference: https://llvm.org/bugs/show_bug.cgi?id=27626
Differential Revision: http://reviews.llvm.org/D19984
llvm-svn: 273687
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is a resubmittion of previously reverted rL273568.
This is a fix for the problem mentioned in "LTO and intrinsics mangling" llvm-dev mail thread:
http://lists.llvm.org/pipermail/llvm-dev/2016-April/098387.html
Reviewers: mehdi_amini, reames
Differential Revision: http://reviews.llvm.org/D19373
llvm-svn: 273686
|
| |
|
|
|
|
| |
Intrinsic::matchIntrinsicVarArg since it will be reused for intrinsic remangling code
llvm-svn: 273685
|
| |
|
|
|
|
|
| |
The Value is only used in debug or asserts builds. Just cast to void to silence
an unused variable warning.
llvm-svn: 273684
|
| |
|
|
|
|
|
|
|
| |
This adds rudimentary support for COFF ARM to the dynamic loader for the
exeuction engine. This can be used by lldb to JIT code into a COFF ARM
environment. This lays the foundation for the loader, though a few of the
relocation types are yet unhandled.
llvm-svn: 273682
|
| |
|
|
|
|
| |
Should fix the msan bots.
llvm-svn: 273679
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D21657
llvm-svn: 273678
|
| |
|
|
|
|
| |
This doesn't handle ELF, but neither did the previous code.
llvm-svn: 273677
|
| |
|
|
| |
llvm-svn: 273674
|
| |
|
|
| |
llvm-svn: 273673
|
| |
|
|
| |
llvm-svn: 273672
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
We can avoid repeating the check `isGuaranteedToExecute` when it's already called once while checking if the alignment can be widened for the load/store being hoisted.
The function is invariant for the same instruction `UI` in `isGuaranteedToExecute(*UI, DT, CurLoop, SafetyInfo);`
Reviewers: hfinkel, eli.friedman
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D21672
llvm-svn: 273671
|
| |
|
|
|
|
|
|
| |
This will do various things including ones
CodeGenPrepare does, but with knowledge of uniform
values.
llvm-svn: 273657
|
| |
|
|
|
|
|
|
| |
The only real reason to use it is for testing, so replace
it with a command line option instead of a potentially function
dependent feature.
llvm-svn: 273653
|
| |
|
|
|
|
|
|
|
| |
Split AMDGPUSubtarget into amdgcn/r600 specific subclasses.
This removes most of the static_casting of the basic codegen
classes everywhere, and tries to restrict the features
visible on the wrong target.
llvm-svn: 273652
|
| |
|
|
|
|
|
| |
This makes the code a little more concise, no functional change is
intended.
llvm-svn: 273644
|
| |
|
|
| |
llvm-svn: 273643
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reduce the number of comparisons.
Specifically, InstCombine can turn:
(i == 5334 || i == 5335)
into:
((i | 1) == 5335)
SimplifyCFG was already able to detect the pattern:
(i == 5334 || i == 5335)
to:
((i & -2) == 5334)
This patch supersedes D21315 and resolves PR27555
(https://llvm.org/bugs/show_bug.cgi?id=27555).
Thanks to David and Chandler for the suggestions!
Author: Thomas Jablin (tjablin)
Reviewers: majnemer chandlerc halfdan cycheng
http://reviews.llvm.org/D21397
llvm-svn: 273639
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
module summary.
The function name Module::empty() is slightly misleading in that it
only tests for the presence of functions in the module. However we
still want to emit the module summary if the module contains only
global variables or aliases. The presence of such entities can be
determined simply by checking the summary directly, as we are doing
below.
Differential Revision: http://reviews.llvm.org/D21669
llvm-svn: 273638
|
| |
|
|
|
|
| |
Apparently earlier versions of MSVC don't have constexpr bitset ctors.
llvm-svn: 273637
|