OSDN Git Service
Marek Olsak [Thu, 15 Jan 2015 18:42:55 +0000 (18:42 +0000)]
R600/SI: Add V_READLANE_B32 and V_WRITELANE_B32 for VI
These are VOP3-only on VI.
The new multiclass doesn't define VOP3 versions of VOP2 instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226189
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Thu, 15 Jan 2015 18:42:51 +0000 (18:42 +0000)]
R600/SI: Don't shrink instructions whose e32 encoding doesn't exist
v2: modify hasVALU32BitEncoding instead
v3: - add pseudoToMCOpcode helper to AMDGPUInstInfo, which is used by both
hasVALU32BitEncoding and AMDGPUMCInstLower::lower
- report an error if a pseudo can't be lowered
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226188
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Thu, 15 Jan 2015 18:42:44 +0000 (18:42 +0000)]
R600/SI: Add common class VOPAnyCommon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226187
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Thu, 15 Jan 2015 18:42:40 +0000 (18:42 +0000)]
R600/SI: Don't select SI-only VOP3 opcodes on VI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226186
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Thu, 15 Jan 2015 18:16:00 +0000 (18:16 +0000)]
[Hexagon] Adding vmux instruction. Removing old transfer instructions and updating references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226184
91177308-0d34-0410-b5e6-
96231b3b80d8
Ramkumar Ramachandra [Thu, 15 Jan 2015 18:10:44 +0000 (18:10 +0000)]
statepoint tests: use statepoint-example gc
Mechanical conversion of statepoint tests to use the example-statepoint
gc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226183
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Thu, 15 Jan 2015 17:59:02 +0000 (17:59 +0000)]
Support @PLT loads on 32bit x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226182
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Thu, 15 Jan 2015 17:28:14 +0000 (17:28 +0000)]
[Hexagon] Deleting old float comparison instruction and updating references to new ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226179
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Thu, 15 Jan 2015 16:30:07 +0000 (16:30 +0000)]
[Hexagon] Replacing old fadd/fsub instructions and updating references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226176
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Thu, 15 Jan 2015 16:14:34 +0000 (16:14 +0000)]
Revert Don't create new comdats in CodeGen
It breaks AddressSanitizer on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226173
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 15 Jan 2015 15:41:03 +0000 (15:41 +0000)]
[mips] Fix a typo in the compare patterns for MIPS32r6/MIPS64r6.
Summary: The patterns intended for the SETLE node were actually matching the SETLT node.
Reviewers: atanasyan, sstankovic, vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6997
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226171
91177308-0d34-0410-b5e6-
96231b3b80d8
Vasileios Kalintiris [Thu, 15 Jan 2015 15:36:04 +0000 (15:36 +0000)]
Fix the C-API MCJIT test for 32-bit big endian machines.
Avoid using unions for storing the return value from
LLVMGetGlobalValueAddress() and LLVMGetFunctionAddress() and accessing it as
a pointer through another pointer member. This causes problems on 32-bit big
endian machines since the pointer gets the higher part of the return value of
the aforementioned functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226170
91177308-0d34-0410-b5e6-
96231b3b80d8
Vladimir Medic [Thu, 15 Jan 2015 14:18:12 +0000 (14:18 +0000)]
Add disassembler tests for mips64r6 platform. There are no functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226166
91177308-0d34-0410-b5e6-
96231b3b80d8
Vladimir Medic [Thu, 15 Jan 2015 14:11:38 +0000 (14:11 +0000)]
Add disassembler tests for mips32r6 platform. There are no functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226165
91177308-0d34-0410-b5e6-
96231b3b80d8
Vladimir Medic [Thu, 15 Jan 2015 14:06:34 +0000 (14:06 +0000)]
Add disassembler tests for mips64r2 platform. There are no functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226164
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 15 Jan 2015 12:03:32 +0000 (12:03 +0000)]
Fix SelectionDAG -view-*-dags filtering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226163
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Thu, 15 Jan 2015 11:41:30 +0000 (11:41 +0000)]
Replace size method call of containers to empty method where appropriate
This patch was generated by a clang tidy checker that is being open sourced.
The documentation of that checker is the following:
/// The emptiness of a container should be checked using the empty method
/// instead of the size method. It is not guaranteed that size is a
/// constant-time function, and it is generally more efficient and also shows
/// clearer intent to use empty. Furthermore some containers may implement the
/// empty method but not implement the size method. Using empty whenever
/// possible makes it easier to switch to another container in the future.
Patch by Gábor Horváth!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226161
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 15 Jan 2015 11:39:46 +0000 (11:39 +0000)]
[PM] Port TargetLibraryInfo to the new pass manager, provided by the
TargetLibraryAnalysis pass.
There are actually no direct tests of this already in the tree. I've
added the most basic test that the pass manager bits themselves work,
and the TLI object produced will be tested by an upcoming patches as
they port passes which rely on TLI.
This is starting to point out the awkwardness of the invalidate API --
it seems poorly fitting on the *result* object. I suspect I will change
it to live on the analysis instead, but that's not for this change, and
I'd rather have a few more passes ported in order to have more
experience with how this plays out.
I believe there is only one more analysis required in order to start
porting instcombine. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226160
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 15 Jan 2015 10:41:28 +0000 (10:41 +0000)]
[PM] Separate the TargetLibraryInfo object from the immutable pass.
The pass is really just a means of accessing a cached instance of the
TargetLibraryInfo object, and this way we can re-use that object for the
new pass manager as its result.
Lots of delta, but nothing interesting happening here. This is the
common pattern that is developing to allow analyses to live in both the
old and new pass manager -- a wrapper pass in the old pass manager
emulates the separation intrinsic to the new pass manager between the
result and pass for analyses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226157
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 15 Jan 2015 09:37:15 +0000 (09:37 +0000)]
Hide some redundant AVX512 instructions from the asm parser, but force them to show up in the disassembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226155
91177308-0d34-0410-b5e6-
96231b3b80d8
Vladimir Medic [Thu, 15 Jan 2015 08:50:20 +0000 (08:50 +0000)]
Add disassembler tests for mips64 platform. There are no functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226151
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 15 Jan 2015 07:11:23 +0000 (07:11 +0000)]
SimplifyIndVar: Remove unused variable
OtherOperandIdx is not used anymore, remove it to silence warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226138
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 15 Jan 2015 05:21:00 +0000 (05:21 +0000)]
Update libdeps since TLI was moved from Target to Analysis in r226078.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226126
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 15 Jan 2015 05:20:46 +0000 (05:20 +0000)]
Reorder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226125
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 15 Jan 2015 04:36:20 +0000 (04:36 +0000)]
utils/release/tag.sh: fix -revision vs. -rc check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226124
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 15 Jan 2015 03:51:04 +0000 (03:51 +0000)]
[PM] Clean up the TLI doxygen comments prior to refactoring this code
for the new pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226089
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 15 Jan 2015 03:08:59 +0000 (03:08 +0000)]
Revert "r226071 - [RegisterCoalescer] Remove copies to reserved registers"
Reverting this while I investigate some bad behavior this is causing. As a
possibly-related issue, adding -verify-machineinstrs to one of the test cases
now fails because of this change:
llc test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll -march=x86-64 -o - -verify-machineinstrs
*** Bad machine code: No instruction at def index ***
- function: foo
- basic block: BB#0 return (0x10007e21f10) [0B;736B)
- liverange: [128r,128d:9)[160r,160d:8)[176r,176d:7)[336r,336d:6)[464r,464d:5)[480r,480d:4)[624r,624d:3)[752r,752d:2)[768r,768d:1)[78
4r,784d:0) 0@784r 1@768r 2@752r 3@624r 4@480r 5@464r 6@336r 7@176r 8@160r 9@128r
- register: %DS
Valno #3 is defined at 624r
*** Bad machine code: Live segment doesn't end at a valid instruction ***
- function: foo
- basic block: BB#0 return (0x10007e21f10) [0B;736B)
- liverange: [128r,128d:9)[160r,160d:8)[176r,176d:7)[336r,336d:6)[464r,464d:5)[480r,480d:4)[624r,624d:3)[752r,752d:2)[768r,768d:1)[78
4r,784d:0) 0@784r 1@768r 2@752r 3@624r 4@480r 5@464r 6@336r 7@176r 8@160r 9@128r
- register: %DS
[624r,624d:3)
LLVM ERROR: Found 2 machine code errors.
where 624r corresponds exactly to the interval combining change:
624B %RSP<def> = COPY %vreg16; GR64:%vreg16
Considering merging %vreg16 with %RSP
RHS = %vreg16 [608r,624r:0) 0@608r
updated: 608B %RSP<def> = MOV64rm <fi#3>, 1, %noreg, 0, %noreg; mem:LD8[%saved_stack.1]
Success: %vreg16 -> %RSP
Result = %RSP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226086
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 15 Jan 2015 02:21:56 +0000 (02:21 +0000)]
Switch this header file to not hard-code Windows line endings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226081
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 15 Jan 2015 02:16:27 +0000 (02:16 +0000)]
[PM] Move TargetLibraryInfo into the Analysis library.
While the term "Target" is in the name, it doesn't really have to do
with the LLVM Target library -- this isn't an abstraction which LLVM
targets generally need to implement or extend. It has much more to do
with modeling the various runtime libraries on different OSes and with
different runtime environments. The "target" in this sense is the more
general sense of a target of cross compilation.
This is in preparation for porting this analysis to the new pass
manager.
No functionality changed, and updates inbound for Clang and Polly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226078
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 15 Jan 2015 02:15:21 +0000 (02:15 +0000)]
Win64Exception.cpp: Try to fix crash for x64 EH. "Per" might be null there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226077
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 15 Jan 2015 01:46:09 +0000 (01:46 +0000)]
Fix PR22222
The bug was introduced in r225282. r225282 assumed that sub X, Y is
the same as add X, -Y. This is not correct if we are going to upgrade
the sub to sub nuw. This change fixes the issue by making the
optimization ignore sub instructions.
Differential Revision: http://reviews.llvm.org/D6979
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226075
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 15 Jan 2015 01:33:00 +0000 (01:33 +0000)]
[TableGen] Add support for negative immediates to AsmMatcherEmitter
This adds support for creating an InstAlias with a negative immediate, i.e.:
def NOT : InstAlias<"not $dst, $src", (XORI GR32:$dst, GR32:$src, -1)>;
by resolving this problem:
RISCVGenAsmMatcher.inc:95:11: error: expected '= constant-expression' or end of enumerator definition
CVT_imm_-1,
^^^^^^^^^^
Patch by Jordy Potman, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226073
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 15 Jan 2015 01:25:28 +0000 (01:25 +0000)]
[RegisterCoalescer] Remove copies to reserved registers
This allows the RegisterCoalescer to join "non-flipped" range pairs with a
physical destination register -- which allows the RegisterCoalescer to remove
copies like this:
<vreg> = something (maybe a load, for example)
... (things that don't use PHYSREG)
PHYSREG = COPY <vreg>
(with all of the restrictions normally applied by the RegisterCoalescer: having
compatible register classes, etc. )
Previously, the RegisterCoalescer handled only the opposite case (copying
*from* a physical register). I don't handle the problem fully here, but try to
get the common case where there is only one use of <vreg> (the COPY).
An upcoming commit to the PowerPC backend will make this pattern much more
common on PPC64/ELF systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226071
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 15 Jan 2015 01:00:53 +0000 (01:00 +0000)]
[PowerPC] Add assembler support for mcrfs and friends
Fill out our support for the floating-point status and control register
instructions (mcrfs and friends). As it turns out, these are necessary for
compiling src/test/harness_fp.h in TBB for PowerPC.
Thanks to Raf Schietekat for reporting the issue!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226070
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 15 Jan 2015 01:00:33 +0000 (01:00 +0000)]
For PR21145: recognise a builtin call to a known deallocation function even if
it's defined in the current module. Clang generates this situation for the
C++14 sized deallocation functions, because it generates a weak definition in
case one isn't provided by the C++ runtime library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226069
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Thu, 15 Jan 2015 00:15:30 +0000 (00:15 +0000)]
[Hexagon] Replacing old versions of stores and loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226065
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 15 Jan 2015 00:11:36 +0000 (00:11 +0000)]
Add missing include directive for llvm::make_unique().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226064
91177308-0d34-0410-b5e6-
96231b3b80d8
Ramkumar Ramachandra [Wed, 14 Jan 2015 23:27:07 +0000 (23:27 +0000)]
[GC] CodeGenPrep transform: simplify offsetable relocate
The transform is somewhat involved, but the basic idea is simple: find
derived pointers that have been offset from the base pointer using gep
and replace the relocate of the derived pointer with a gep to the
relocated base pointer (with the same offset).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226060
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 14 Jan 2015 23:11:51 +0000 (23:11 +0000)]
IR: Fix comment spelling, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226058
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 14 Jan 2015 23:07:36 +0000 (23:07 +0000)]
[Hexagon] Replacing old version of convert and load f64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226057
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Wed, 14 Jan 2015 23:05:17 +0000 (23:05 +0000)]
getMangledTypeStr: clarify how it mangles types, and add tests
"Write a set of tests that show how name mangling is done for overloaded intrinsics." These happen to use gc.relocates to exercise the codepath in question, but is not a GC specific test.
Patch by: artagnon@gmail.com
Differential Revision: http://reviews.llvm.org/D6915
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226056
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 14 Jan 2015 23:01:36 +0000 (23:01 +0000)]
Update libdeps in NVPTXCodeGen, since r225944.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226055
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 14 Jan 2015 22:47:54 +0000 (22:47 +0000)]
Use MMI->getPersonality() instead of MMI->getPersonalities()[MMI->getPersonalityIndex()]
Also nuke the comment about supporting multiple personalities in a
single function, aka PR1414. That's just crazy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226052
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 14 Jan 2015 22:27:36 +0000 (22:27 +0000)]
IR: Move MDLocation into place
This commit moves `MDLocation`, finishing off PR21433. There's an
accompanying clang commit for frontend testcases. I'll attach the
testcase upgrade script I used to PR21433 to help out-of-tree
frontends/backends.
This changes the schema for `DebugLoc` and `DILocation` from:
!{i32 3, i32 7, !7, !8}
to:
!MDLocation(line: 3, column: 7, scope: !7, inlinedAt: !8)
Note that empty fields (line/column: 0 and inlinedAt: null) don't get
printed by the assembly writer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226048
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 14 Jan 2015 22:25:14 +0000 (22:25 +0000)]
MachineVerifier: Allow undef reads if a matching superreg is defined.
Summary:
Some pseudo instruction expansions break down a wide register use into
multiple uses of smaller sub registers. If the super register was
partially undefined the broken down sub registers may be completely
undefined now leading to MachineVerifier complaints. Unfortunately
liveness information to add the required dead flags is not easily
(cheaply) available when expanding pseudo instructions.
This commit changes the verifier to be quiet if there is an additional
implicit use of a super register. Pseudo instruction expanders can use
this to mark cases where partially defined values get potentially broken
into completely undefined ones.
Differential Revision: http://reviews.llvm.org/D6973
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226047
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 14 Jan 2015 22:14:26 +0000 (22:14 +0000)]
IR: Always print MDLocation line
Print `MDLocation`'s `line` field even when it's 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226046
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 14 Jan 2015 21:58:17 +0000 (21:58 +0000)]
IR: Drop metadata references more aggressively during teardown
Sometimes teardown happens before the debug info graph is complete
(e.g., when clang throws an error). In that case, `MDNode`s will still
have RAUW, so deleting constants that the `MDNode`s point at will be
relatively expensive -- it'll cause re-uniquing all up the chain (what
I've been referring to as "teardown madness").
So, drop references *before* deleting constants. We need to drop a few
more references now: the metadata side of the metadata/value bridges
needs to be dropped off the cliff along with the rest of it (previously,
the bridges were cleaned before we did anything with the `MDNode`s).
There's no real functionality change here -- state before and after
`LLVMContextImpl::~LLVMContextImpl()` is unchanged -- so no testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226044
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 14 Jan 2015 20:55:48 +0000 (20:55 +0000)]
Don't create new comdats in CodeGen.
This patch stops the implicit creation of comdats during codegen.
Clang now sets the comdat explicitly when it is required. With this patch clang and gcc
now produce the same result in pr19848.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226038
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 14 Jan 2015 20:26:15 +0000 (20:26 +0000)]
[Hexagon] Removing old, unused !tstbit instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226036
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 14 Jan 2015 20:24:46 +0000 (20:24 +0000)]
Add a test that would have found the issue with r225644.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226035
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 14 Jan 2015 20:19:29 +0000 (20:19 +0000)]
[MBP] Add flags to disable the BadCFGConflict check in MachineBlockPlacement.
Some benchmarks have shown that this could lead to a potential
performance benefit, and so adding some flags to try to help measure the
difference.
A possible explanation. In diamond-shaped CFGs (A followed by either
B or C both followed by D), putting B and C both in between A and
D leads to the code being less dense than it could be. Always either
B or C have to be skipped increasing the chance of cache misses etc.
Moving either B or C to after D might be beneficial on average.
In the long run, but we should probably do a better job of analyzing the
basic block and branch probabilities to move the correct one of B or
C to after D. But even if we don't use this in the long run, it is
a good baseline for benchmarking.
Original patch authored by Daniel Jasper with test tweaks and a second
flag added by me.
Differential Revision: http://reviews.llvm.org/D6969
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226034
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Wed, 14 Jan 2015 20:17:10 +0000 (20:17 +0000)]
[PPC64] Add support for the ICBT instruction on POWER8.
Patch by Kit Barton.
Support for the ICBT instruction is currently present, but limited to
embedded processors. This change adds a new FeatureICBT that can be used
to identify whether the ICBT instruction is available on a specific processor.
Two new tests are added:
* Positive test to ensure the icbt instruction is present when using
-mcpu=pwr8
* Negative test to ensure the icbt instruction is not generated when
using -mcpu=pwr7
Both test cases use the Prefetch opcode in LLVM. They are based on the
ppc64-prefetch.ll test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226033
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 14 Jan 2015 20:08:46 +0000 (20:08 +0000)]
Fix linking of shared libraries.
In shared libraries the plugin can see non-weak declarations that are still
undefined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226031
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 14 Jan 2015 19:59:18 +0000 (19:59 +0000)]
Add comment about a gotcha I ran across while touching this code.
I haven't looked closely at exactly why the side effect is required, but
this seems better than not mentioning it at all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226030
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 14 Jan 2015 19:56:10 +0000 (19:56 +0000)]
IR: Fix a use-after-free in RAUW
Happened pretty commonly during `LLVMContext` teardown when `clang -g`
hit an error. This fixes the use-after-free. Next I'll clean up
teardown so that it's not RAUW'ing when metadata-tracked values are
deleted (only really causes a problem if the graph is mid-construction
when teardown starts, but it's still unnecessary work).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226029
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 14 Jan 2015 19:55:27 +0000 (19:55 +0000)]
unique_ptrify the value in DominatorTreeBase::DomTreeNodes
(noticed the need for an explicit dtor in a recent commit & figured I'd
tidy that up)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226028
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 14 Jan 2015 19:43:32 +0000 (19:43 +0000)]
Fix handling of extern_weak. This was broken by r225983.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226026
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 14 Jan 2015 19:26:56 +0000 (19:26 +0000)]
InstCombine: Don't take A-B<0 into A<B if A-B has other uses
This fixes PR22226.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226023
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 14 Jan 2015 19:07:23 +0000 (19:07 +0000)]
Revert "Add r224985 back with two fixes."
This reverts commit r225644 while I debug a regression.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226022
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 14 Jan 2015 18:50:10 +0000 (18:50 +0000)]
Emit the Itanium LSDA for unknown EH personalities on Win64
This fixes lots of generic CodeGen tests that use __gcc_personality_v0.
This suggests that using ExceptionHandling::MSVC was a mistake, and we
should instead classify each function by personality function. This
would, for example, allow us to LTO a binary containing uses of SEH and
Itanium EH.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226019
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 14 Jan 2015 18:49:39 +0000 (18:49 +0000)]
Remove dead code for llvm.eh.selector in the old EH model
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226018
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 14 Jan 2015 18:26:14 +0000 (18:26 +0000)]
[Hexagon] Removing old versions of cmph and updating references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226013
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 14 Jan 2015 18:25:45 +0000 (18:25 +0000)]
Add support for comdats with names larger than 256 characters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226012
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 14 Jan 2015 18:07:30 +0000 (18:07 +0000)]
ReleaseNotes.rst: bump version to 3.7
The 3.6 notes are now in the 3.6 branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226007
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 14 Jan 2015 18:05:44 +0000 (18:05 +0000)]
[Hexagon] Removing old versions of cmpb and updating references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226006
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 14 Jan 2015 17:38:03 +0000 (17:38 +0000)]
Trunk is now 3.7.0svn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226004
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 14 Jan 2015 16:49:12 +0000 (16:49 +0000)]
[Hexagon] Deleting versions of compare-not that don't have encoding information. Updating references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226003
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 14 Jan 2015 16:03:58 +0000 (16:03 +0000)]
fix typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225991
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 14 Jan 2015 15:42:34 +0000 (15:42 +0000)]
R600/SI: Use IMPLICIT_DEF and KILL when failing to spill VGPRs
This helps us avoid 'invalid register class for operand' verifier
errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225989
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 14 Jan 2015 15:42:31 +0000 (15:42 +0000)]
R600/SI: Spill VGPRs to scratch space for compute shaders
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225988
91177308-0d34-0410-b5e6-
96231b3b80d8
Olivier Sallenave [Wed, 14 Jan 2015 15:36:28 +0000 (15:36 +0000)]
Check that the TLI callback enableAggressiveFMAFusion has the desired effect on FMA folding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225987
91177308-0d34-0410-b5e6-
96231b3b80d8
Olivier Sallenave [Wed, 14 Jan 2015 14:47:24 +0000 (14:47 +0000)]
Override the TLI callback enableAggressiveFMAFusion and return true. Indeed, fmul, fmadd and fadd nodes cost the same number of cycles, so we can enable more combining heuristics to produce more fmadd nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225984
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 14 Jan 2015 13:53:50 +0000 (13:53 +0000)]
Handle a symbol being undefined.
This can happen if:
* It is present in a comdat in one file.
* It is not present in the comdat of the file that is kept.
* Is is not used.
This should fix the LTO boostrap.
Thanks to Takumi NAKAMURA for setting up the bot!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225983
91177308-0d34-0410-b5e6-
96231b3b80d8
Vladimir Medic [Wed, 14 Jan 2015 11:35:22 +0000 (11:35 +0000)]
Add disassembler tests for mips32r2 platform. There are no functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225980
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Eckstein [Wed, 14 Jan 2015 11:24:47 +0000 (11:24 +0000)]
reapply: SLPVectorizer: Cache results from memory alias checking.
This speeds up the dependency calculations for blocks with many load/store/call instructions.
Beside the improved runtime, there is no functional change.
Compared to the original commit, this re-applied commit contains a bug fix which ensures that there are
no incorrect collisions in the alias cache.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225977
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 14 Jan 2015 11:23:27 +0000 (11:23 +0000)]
[cleanup] Re-sort all the #include lines in LLVM using
utils/sort_includes.py.
I clearly haven't done this in a while, so more changed than usual. This
even uncovered a missing include from the InstrProf library that I've
added. No functionality changed here, just mechanical cleanup of the
include order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225974
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyoti Allur [Wed, 14 Jan 2015 10:48:16 +0000 (10:48 +0000)]
Correct POP handling for v7m
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225972
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 14 Jan 2015 10:33:21 +0000 (10:33 +0000)]
[dom] Make the DominatorTreeBase not a dynamic class!
Now that the passes are wrappers around this, we no longer need
a vtable, virtual destructor, and other associated mess. This is
particularly nice to me as this is a class template. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225970
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 14 Jan 2015 10:19:28 +0000 (10:19 +0000)]
[PM] Port domtree to the new pass manager (at last).
This adds the domtree analysis to the new pass manager. The analysis
returns the same DominatorTree result entity used by the old pass
manager and essentially all of the code is shared. We just have
different boilerplate for running and printing the analysis.
I've converted one test to run in both modes just to make sure this is
exercised while both are live in the tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225969
91177308-0d34-0410-b5e6-
96231b3b80d8
Kai Nacke [Wed, 14 Jan 2015 10:19:09 +0000 (10:19 +0000)]
[mips] Refine octeon instructions seq/seqi/sne/snei
This commit refines the pattern for the octeon seq/seqi/sne/snei instructions.
The target register is set to 0 or 1 according to the result of the comparison.
In C, this is something like
rd = (unsigned long)(rs == rt)
This commit adds a zext to bring the result to i64. With this change the
instruction is selected for this type of code. (gcc produces the same code for
the above C code.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225968
91177308-0d34-0410-b5e6-
96231b3b80d8
Vladimir Medic [Wed, 14 Jan 2015 10:18:56 +0000 (10:18 +0000)]
Add disassembler tests for mips32r2 platform. There are no functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225967
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 14 Jan 2015 10:07:19 +0000 (10:07 +0000)]
[PM] Make DominatorTrees (corectly) movable so that we can move them
into the new pass manager's analysis cache which stores results
by-value.
Technically speaking, the dom trees were originally not movable but
copyable! This, unsurprisingly, didn't work at all -- the copy was
shallow and just resulted in rampant memory corruption. This change
explicitly forbids copying (as it would need to be a deep copy) and
makes them explicitly movable with the unsurprising boiler plate to
member-wise move them because we can't rely on MSVC to generate this
code for us. =/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225966
91177308-0d34-0410-b5e6-
96231b3b80d8
Brad Smith [Wed, 14 Jan 2015 07:53:39 +0000 (07:53 +0000)]
Use the integrated assembler by default on SPARC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225957
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 14 Jan 2015 06:14:36 +0000 (06:14 +0000)]
Use the operand vector instead so inline assembly can be validated too
The buildbots got upset after r225941, this should hopefully fix things.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225954
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 14 Jan 2015 06:03:18 +0000 (06:03 +0000)]
SelectionDAG: add a -filter-view-dags option to llc
This option takes the name of the basic block you want to visualize
with -view-*-dags
Differential Revision: http://reviews.llvm.org/D6948
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225953
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 14 Jan 2015 05:45:24 +0000 (05:45 +0000)]
DAG Combiner: Fold SelectCC When Cond is UNDEF
In case folding a node end up with a NaN as operand for the select,
the folding of the condition of the selectcc node returns "UNDEF".
Differential Revision: http://reviews.llvm.org/D6889
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225952
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 14 Jan 2015 05:38:48 +0000 (05:38 +0000)]
Add assertions for out of bound index in ComputeLinearIndex
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225951
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 14 Jan 2015 05:37:10 +0000 (05:37 +0000)]
X86: only access operands if they are present
If there is no associated immediate (MS style inline asm), do not try to access
the operand, assume that it is valid. This should fix the buildbots after SVN
r225941.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225950
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 14 Jan 2015 05:33:01 +0000 (05:33 +0000)]
Fold a loop for array processing in ComputeLinearIndex
When processing an array, every Elt has the same layout, it is
useless to recursively call each ComputeLinearIndex on each element.
Just do it once and multiply by the number of elements.
Differential Revision: http://reviews.llvm.org/D6832
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225949
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Wed, 14 Jan 2015 05:24:33 +0000 (05:24 +0000)]
Revert "Insert random noops to increase security against ROP attacks (llvm)"
This reverts commit:
http://reviews.llvm.org/D3392
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225948
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 14 Jan 2015 05:14:30 +0000 (05:14 +0000)]
NVPTX: Use MapMetadata() instead of custom/stale/untested logic
Copy the `GVMap` over to a standard `ValueToValueMapTy` so that we can
reuse the `MapMetadata()` logic. Unfortunately the `GVMap` can't just
be replaced, since `MapMetadata()` likes to modify the map, but at least
this will prevent NVPTX from bitrotting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225944
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 14 Jan 2015 05:13:18 +0000 (05:13 +0000)]
NVPTX: Remove bogus remap logic for global variable address spaces
The comment is incorrect, and the code mangles debug info. Remove the
bad logic, which wasn't tested anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225943
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 14 Jan 2015 05:10:21 +0000 (05:10 +0000)]
X86: validate 'int' instruction
The int instruction takes as an operand an 8-bit immediate value. Validate that
the input is valid rather than silently truncating the value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225941
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 14 Jan 2015 04:21:33 +0000 (04:21 +0000)]
Disable a couple of tests, CodeGen/X86/noop-insert.ll and CodeGen/X86/noop-insert-percentage.ll, in r225908, to unbreak tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225940
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 14 Jan 2015 03:58:50 +0000 (03:58 +0000)]
[dom] Remove extraneous inline keywords. Template functions and inline
class members are implicitly "inline", no key word needed.
Naturally, this could change how LLVM inlines these functions because
<GRR>, but that's not an excuse to use the keyword. ;]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225939
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 14 Jan 2015 03:56:00 +0000 (03:56 +0000)]
[dom] The formatting of the generic domtree has bitrotted over the years
significantly. Clean it up with the help of clang-format.
I've touched this up by hand in a couple of places that weren't quite
right (IMO). I think most of these actually have bugs open about
already.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225938
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 14 Jan 2015 03:55:58 +0000 (03:55 +0000)]
[dom] Clean up some comments in this header that were confusingly
formatted or placed incorrectly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225937
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 14 Jan 2015 03:34:55 +0000 (03:34 +0000)]
[dom] Add a basic dominator tree test.
Correct, we have *zero* basic testing of the dominator tree in the
regression test suite. There is a single test that even prints it out,
and that test only checks a single line of the output. There are
a handful of tests that check post dominators, but all of those are
looking for bugs rather than just exercising the basic machinery.
This test is super boring and unexciting. But hey, it's something.
I needed there to be something so I could switch the basic test to run
with both the old and new pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225936
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Wed, 14 Jan 2015 03:02:16 +0000 (03:02 +0000)]
Fix a wrong comment in LoopVectorize.
I.E. more than two -> exactly two
Fix a typo function name in LoopVectorize.
I.E. collectStrideAcccess() -> collectStrideAccess()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225935
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 14 Jan 2015 02:24:10 +0000 (02:24 +0000)]
TargetInstrInfo.h: Fix \param in r225772. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225933
91177308-0d34-0410-b5e6-
96231b3b80d8