Tim Northover [Fri, 18 Apr 2014 09:31:01 +0000 (09:31 +0000)]
AArch64/ARM64: port BSL logic from AArch64 & enable test.
I enhanced it a little in the process. The decision shouldn't really be beased
on whether a BUILD_VECTOR is a splat: any set of constants will do the job
provided they're related in the correct way.
Also, the BUILD_VECTOR could be any operand of the incoming AND nodes, so it's
best to check for all 4 possibilities rather than assuming it'll be the RHS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206569
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 18 Apr 2014 09:30:52 +0000 (09:30 +0000)]
AArch64/ARM64: copy byval implementation from AArch64.
It's not actually used to handle C or C++ ABI rules on ARM64, but could well be
emitted by other language front-ends, so it's as well to have a sensible
implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206568
91177308-0d34-0410-b5e6-
96231b3b80d8
Jiangning Liu [Fri, 18 Apr 2014 09:05:50 +0000 (09:05 +0000)]
Add missing config file for newly added test case introduced by r206563.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206567
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Fri, 18 Apr 2014 08:50:09 +0000 (08:50 +0000)]
Updated test with register names following r206565.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206566
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Fri, 18 Apr 2014 08:03:38 +0000 (08:03 +0000)]
Patch by Ray Donnelly.
Emit WIN64 SEH registers by name instead of just number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206565
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 18 Apr 2014 08:02:42 +0000 (08:02 +0000)]
[asan] one more workaround for PR17409: don't do BB-level coverage instrumentation if there are more than N (=1500) basic blocks. This makes ASanCoverage work on libjpeg_turbo/jchuff.c used by Chrome, which has 1824 BBs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206564
91177308-0d34-0410-b5e6-
96231b3b80d8
Jiangning Liu [Fri, 18 Apr 2014 07:57:54 +0000 (07:57 +0000)]
This commit allows vectorized loops to be unrolled by a factor of 2 for AArch64.
A new test case is also added for ARM64.
Patched by Z.Zheng
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206563
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 18 Apr 2014 07:40:20 +0000 (07:40 +0000)]
R600: Minor cleanups.
Fix indentation, better line wrapping, unused includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206562
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 18 Apr 2014 06:48:23 +0000 (06:48 +0000)]
[ExecutionEngine] Allow JIT clients to enable/disable module verification.
Previously module verification was always enabled, with no way to turn it off.
As of this commit, module verification is on by default in Debug builds, and off
by default in release builds. The default behaviour can be overridden by calling
setVerifyModules(bool) on the JIT instance (this works for both the old JIT, and
MCJIT).
<rdar://problem/
16150008>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206561
91177308-0d34-0410-b5e6-
96231b3b80d8
Jiangning Liu [Fri, 18 Apr 2014 05:58:09 +0000 (05:58 +0000)]
This is one of the optimizations ported from ARM64 to AArch64 to address the performance gap between these two back ends. The test case newly added for AArch64 already exists in ARM64.
Patched by Z.Zheng
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206559
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 18 Apr 2014 05:19:26 +0000 (05:19 +0000)]
R600/SI: Try to use scalar BFE.
Use scalar BFE with constant shift and offset when possible.
This is complicated by the fact that the scalar version packs
the two operands of the vector version into one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206558
91177308-0d34-0410-b5e6-
96231b3b80d8
Jiangning Liu [Fri, 18 Apr 2014 03:58:38 +0000 (03:58 +0000)]
This commit enables unaligned memory accesses of vector types on AArch64 back end. This should boost vectorized code performance.
Patched by Z. Zheng
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206557
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 18 Apr 2014 02:17:43 +0000 (02:17 +0000)]
Revert "blockfreq: Rewrite BlockFrequencyInfoImpl"
This reverts commits r206548, r206549 and r206549.
There are some unit tests failing that aren't failing locally [1], so
reverting until I have time to investigate.
[1]: http://bb.pgr.jp/builders/ninja-x64-msvc-RA-centos6/builds/1816
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206556
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 18 Apr 2014 02:10:26 +0000 (02:10 +0000)]
OnDiskHashTable: Provide iterator_range for keys and data
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206555
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 18 Apr 2014 02:10:09 +0000 (02:10 +0000)]
blockfreq: Really fix r206548 (and r206549)
Turns out this code is dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206554
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 18 Apr 2014 02:09:07 +0000 (02:09 +0000)]
c++11: Tidy up tblgen w/ range loops.
IntrInfoEmitter cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206553
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 18 Apr 2014 02:09:04 +0000 (02:09 +0000)]
iterator access to scheduling classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206552
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 18 Apr 2014 02:09:02 +0000 (02:09 +0000)]
iterator_range accessor for CodeGenTarget instruction list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206551
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 18 Apr 2014 02:08:58 +0000 (02:08 +0000)]
iterator based accessors for CodeGenInstruction operand list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206550
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 18 Apr 2014 02:06:24 +0000 (02:06 +0000)]
blockfreq: Fixing MSVC after r206548?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206549
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 18 Apr 2014 01:57:45 +0000 (01:57 +0000)]
blockfreq: Rewrite BlockFrequencyInfoImpl
Rewrite the shared implementation of BlockFrequencyInfo and
MachineBlockFrequencyInfo entirely.
The old implementation had a fundamental flaw: precision losses from
nested loops (or very wide branches) compounded past loop exits (and
convergence points).
The @nested_loops testcase at the end of
test/Analysis/BlockFrequencyAnalysis/basic.ll is motivating. This
function has three nested loops, with branch weights in the loop headers
of 1:4000 (exit:continue). The old analysis gives non-sensical results:
Printing analysis 'Block Frequency Analysis' for function 'nested_loops':
---- Block Freqs ----
entry = 1.0
for.cond1.preheader = 1.00103
for.cond4.preheader = 5.5222
for.body6 = 18095.19995
for.inc8 = 4.52264
for.inc11 = 0.00109
for.end13 = 0.0
The new analysis gives correct results:
Printing analysis 'Block Frequency Analysis' for function 'nested_loops':
block-frequency-info: nested_loops
- entry: float = 1.0, int = 8
- for.cond1.preheader: float = 4001.0, int = 32007
- for.cond4.preheader: float =
16008001.0, int =
128064007
- for.body6: float =
64048012001.0, int =
512384096007
- for.inc8: float =
16008001.0, int =
128064007
- for.inc11: float = 4001.0, int = 32007
- for.end13: float = 1.0, int = 8
Most importantly, the frequency leaving each loop matches the frequency
entering it.
The new algorithm leverages BlockMass and PositiveFloat to maintain
precision, separates "probability mass distribution" from "loop
scaling", and uses dithering to eliminate probability mass loss. I have
unit tests for these types out of tree, but it was decided in the review
to make the classes private to BlockFrequencyInfoImpl, and try to shrink
them (or remove them entirely) in follow-up commits.
The new algorithm should generally have a complexity advantage over the
old. The previous algorithm was quadratic in the worst case. The new
algorithm is still worst-case quadratic in the presence of irreducible
control flow, but it's linear without it.
The key difference between the old algorithm and the new is that control
flow within a loop is evaluated separately from control flow outside,
limiting propagation of precision problems and allowing loop scale to be
calculated independently of mass distribution. Loops are visited
bottom-up, their loop scales are calculated, and they are replaced by
pseudo-nodes. Mass is then distributed through the function, which is
now a DAG. Finally, loops are revisited top-down to multiply through
the loop scales and the masses distributed to pseudo nodes.
There are some remaining flaws.
- Irreducible control flow isn't modelled correctly. LoopInfo and
MachineLoopInfo ignore irreducible edges, so this algorithm will
fail to scale accordingly. There's a note in the class
documentation about how to get closer. See also the comments in
test/Analysis/BlockFrequencyInfo/irreducible.ll.
- Loop scale is limited to 4096 per loop (2^12) to avoid exhausting
the 64-bit integer precision used downstream.
- The "bias" calculation proposed on llvmdev is *not* incorporated
here. This will be added in a follow-up commit, once comments from
this review have been handled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206548
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 18 Apr 2014 01:53:18 +0000 (01:53 +0000)]
R600/SI: Match sign_extend_inreg to s_sext_i32_i8 and s_sext_i32_i16
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206547
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Fri, 18 Apr 2014 01:20:08 +0000 (01:20 +0000)]
Fix example for VS2012.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206544
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 18 Apr 2014 01:05:15 +0000 (01:05 +0000)]
PMBuilder: Expose an option to disable tail calls
Adds API to allow frontends to disable tail calls in PassManagerBuilder.
<rdar://problem/
16050591>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206542
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 18 Apr 2014 00:36:21 +0000 (00:36 +0000)]
R600/SI: Use SReg_64 instead of VSrc_64 when selecting BUILD_PAIR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206541
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 17 Apr 2014 23:41:57 +0000 (23:41 +0000)]
[ARM64,C++11] Range'ify another loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206539
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Thu, 17 Apr 2014 22:33:50 +0000 (22:33 +0000)]
Fix bug 19437 - Only add discriminators for DWARF 4 and above.
Summary:
This prevents the discriminator generation pass from triggering if
the DWARF version being used in the module is prior to 4.
Reviewers: echristo, dblaikie
CC: llvm-commits
Differential Revision: http://reviews.llvm.org/D3413
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206507
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 17 Apr 2014 22:26:44 +0000 (22:26 +0000)]
remove some dead code
lib/Analysis/IPA/InlineCost.cpp | 18 ------------------
lib/Analysis/RegionPass.cpp | 1 -
lib/Analysis/TypeBasedAliasAnalysis.cpp | 1 -
lib/Transforms/Scalar/LoopUnswitch.cpp | 21 ---------------------
lib/Transforms/Utils/LCSSA.cpp | 2 --
lib/Transforms/Utils/LoopSimplify.cpp | 6 ------
utils/TableGen/AsmWriterEmitter.cpp | 13 -------------
utils/TableGen/DFAPacketizerEmitter.cpp | 7 -------
utils/TableGen/IntrinsicEmitter.cpp | 2 --
9 files changed, 71 deletions(-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206506
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Thu, 17 Apr 2014 22:15:34 +0000 (22:15 +0000)]
Start pushing changes for Mips Fast-Isel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206505
91177308-0d34-0410-b5e6-
96231b3b80d8
Louis Gerbarg [Thu, 17 Apr 2014 21:32:41 +0000 (21:32 +0000)]
Make test/CodeGen/ARM64/vector-insertion.ll explicitly select neon syntax
Change the command line vector-insertion.ll to explicitly set the neon syntax
to apple so that buildbots that default to other syntaxes won't fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206502
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 17 Apr 2014 21:00:13 +0000 (21:00 +0000)]
R600: Add comment clariying use of sext for result of MUL_U24
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206501
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 17 Apr 2014 21:00:11 +0000 (21:00 +0000)]
R600/SI: Stop using i128 as the resource descriptor type
Having i128 as a legal type complicates the legalization phase. v4i32
is already a legal type, so we will use that instead.
This fixes several piglit tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206500
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 17 Apr 2014 21:00:09 +0000 (21:00 +0000)]
R600/SI: Change default register class for i32 to SReg_32
SIFixSGPRCopies is smart enough to handle this now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206499
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 17 Apr 2014 21:00:07 +0000 (21:00 +0000)]
R600/SI: Teach SIInstrInfo::moveToVALU() how to handle PHI instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206498
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 17 Apr 2014 21:00:01 +0000 (21:00 +0000)]
R600/SI: Legalize operands after changing dst reg in FixSGPRCopies
Otherwise we may not legalize some illegal REG_SEQUENCE instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206497
91177308-0d34-0410-b5e6-
96231b3b80d8
Louis Gerbarg [Thu, 17 Apr 2014 20:51:50 +0000 (20:51 +0000)]
Improve ARM64 vector creation
This patch improves the performance of vector creation in caseiswhere where
several of the lanes in the vector are a constant floating point value. It
also includes new patterns to fold together some of the instructions when the
value is 0.0f. Test cases included.
rdar://
16349427
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206496
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 17 Apr 2014 20:47:31 +0000 (20:47 +0000)]
ARM64: [su]xtw use W regs as inputs, not X regs.
Update the SXT[BHW]/UXTW instruction aliases and the shifted reg addressing
mode handling.
PR19455 and rdar://
16650642
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206495
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 17 Apr 2014 20:30:35 +0000 (20:30 +0000)]
ManagedStatic is never built with a null constructor, remove support for it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206492
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 17 Apr 2014 20:00:33 +0000 (20:00 +0000)]
ARM64: switch to IR-based atomic operations.
Goodbye code!
(Game: spot the bug fixed by the change).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206490
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 17 Apr 2014 20:00:24 +0000 (20:00 +0000)]
ARM64: add acquire/release versions of the existing atomic intrinsics.
These will be needed to support IR-level lowering of atomic
operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206489
91177308-0d34-0410-b5e6-
96231b3b80d8
Gerolf Hoflehner [Thu, 17 Apr 2014 19:14:06 +0000 (19:14 +0000)]
Reverse 206485.
After some discussions the preferred semantics of
the always_inline attribute is
inline always when the compiler can determine
that it it safe to do so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206487
91177308-0d34-0410-b5e6-
96231b3b80d8
Josh Magee [Thu, 17 Apr 2014 19:08:36 +0000 (19:08 +0000)]
[stack protector] Make the StackProtector pass respect ssp-buffer-size.
Previously, SSPBufferSize was assigned the value of the "stack-protector-buffer-size"
attribute after all uses of SSPBufferSize. The effect was that the default
SSPBufferSize was always used during analysis. I moved the check for the
attribute before the analysis; now --param ssp-buffer-size= works correctly again.
Differential Revision: http://reviews.llvm.org/D3349
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206486
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 17 Apr 2014 18:22:47 +0000 (18:22 +0000)]
Atomics: promote ARM's IR-based atomics pass to CodeGen.
Still only 32-bit ARM using it at this stage, but the promotion allows
direct testing via opt and is a reasonably self-contained patch on the
way to switching ARM64.
At this point, other targets should be able to make use of it without
too much difficulty if they want. (See ARM64 commit coming soon for an
example).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206485
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 17 Apr 2014 18:02:36 +0000 (18:02 +0000)]
C++11: Compatibility with (C++03 => MSVC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206481
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 17 Apr 2014 18:02:34 +0000 (18:02 +0000)]
C++11: Document some limitations imposed by MSVC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206480
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 17 Apr 2014 17:06:37 +0000 (17:06 +0000)]
R600/SI: f64 frint is legal on CI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206475
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 17 Apr 2014 16:19:54 +0000 (16:19 +0000)]
[AArch64] Implement the getCSRFirstUseCost API, mirroring that in ARM64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206473
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 17 Apr 2014 12:22:14 +0000 (12:22 +0000)]
Inliner::OptimizationRemark: Fix crash in clang/test/Frontend/optimization-remark.c on some hosts, including --vg.
DebugLoc in Callsite would not live after Inliner. It should be copied before Inliner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206459
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 17 Apr 2014 09:41:54 +0000 (09:41 +0000)]
[LCG] Remove a dead declaration. This stopped being used when I switched
to a more normal move operation on the graph itself. The definition
already got removed, but I missed the declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206455
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 17 Apr 2014 09:40:13 +0000 (09:40 +0000)]
[LCG] Move the call graph node class into the graph class's definition.
This will become necessary to build up the SCC iterators and SCC
definitions. Moving it now so that subsequent diffs are incremental.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206454
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 17 Apr 2014 09:07:50 +0000 (09:07 +0000)]
Make the User::value_op_iterator a random access iterator. I had written
this code ages ago and lost track of it. Seems worth doing though --
this thing can get called from places that would benefit from knowing
that std::distance is O(1). Also add a very fledgeling unittest for
Users and make sure various aspects of this seem to work reasonably.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206453
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 17 Apr 2014 07:25:59 +0000 (07:25 +0000)]
[LCG] Just move the allocator (now that we can) when moving a call
graph. This simplifies the custom move constructor operation to one of
walking the graph and updating the 'up' pointers to point to the new
location of the graph. Switch the nodes from a reference to a pointer
for the 'up' edge to facilitate this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206450
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 17 Apr 2014 07:22:19 +0000 (07:22 +0000)]
[LCG] Remove the Module reference member which we weren't using for
anything and doesn't make sense if assigning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206449
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 17 Apr 2014 07:08:56 +0000 (07:08 +0000)]
[Allocator] Make SpecificBumpPtrAllocator also movable and move
assignable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206448
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 17 Apr 2014 06:33:45 +0000 (06:33 +0000)]
[X86] Add disassembler support for the 0x0f 0x7f form of movq %mm, %mm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206447
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 17 Apr 2014 06:17:23 +0000 (06:17 +0000)]
objdump: identify WoA WinCOFF/ARM correctly
Since LLVM currently only supports WinCOFF, assume that the input is WinCOFF
rather than another type of COFF file (ECOFF/XCOFF). If the architecture is
detected as thumb (e.g. the file has a IMAGE_FILE_MACHINE_ARMNT magic) then use
a triple of thumbv7-windows.
This allows for objdump to properly handle WoA object files without having to
specify the target triple manually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206446
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 17 Apr 2014 06:17:20 +0000 (06:17 +0000)]
MC: rework static_assert to be MSVC compatible
Visual Studio does not permit referencing a structure member as a static field
for sizeof calculations. Resort to a pointer cast which is compatible across
Visual Studio and other compilers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206445
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 17 Apr 2014 02:16:53 +0000 (02:16 +0000)]
Support: Move OnDiskHashTable from clang to llvm
This introduces clang's Basic/OnDiskHashTable.h into llvm as
Support/OnDiskHashTable.h. I've taken the opportunity to add doxygen
comments and run the file through clang-format, but other than the
namespace changing from clang:: to llvm:: the API is identical.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206438
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 17 Apr 2014 02:03:08 +0000 (02:03 +0000)]
R600/SI: Fix zext from i1 to i64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206437
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Thu, 17 Apr 2014 01:01:37 +0000 (01:01 +0000)]
[ARM64] Fix "Cannot select" for vector ctpop
The commit of r205855:
Author: Arnold Schwaighofer <aschwaighofer@apple.com>
Date: Wed Apr 9 14:20:47 2014 +0000
SLPVectorizer: Only vectorize intrinsics whose operands are widened equally
The vectorizer only knows how to vectorize intrinics by widening all operands by
the same factor.
Patch by Tyler Nowicki!
exposed a backend bug causing a regression (Cannot select ctpop).
The commit msg is a bit confusing because the patch actually changes the
behavior for the loop-vectorizer as well. As things got refactored into a
helper ctpop got snuck in to the trivially-vectorizable helper which is now
used by both vectorizers. In other words, we started seeing vector-ctpops in
the backend.
This change makes ctpop LegalizeAction::Expand for the types not supported by
the byte-only CNT instruction. We may be able to custom-lower these later to
a single CNT but this is to fix the compiler crash first.
Fixes <rdar://problem/
16578951>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206433
91177308-0d34-0410-b5e6-
96231b3b80d8
Gerolf Hoflehner [Thu, 17 Apr 2014 00:21:52 +0000 (00:21 +0000)]
Inline a function when the always_inline attribute
is set even when it contains a indirect branch.
The attribute overrules correctness concerns
like the escape of a local block address.
This is for rdar://
16501761
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206429
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 16 Apr 2014 23:15:31 +0000 (23:15 +0000)]
Teach LLVMConfigVersion.cmake to behave as find_package() expects.
Patch by Brad King
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206426
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 16 Apr 2014 23:15:28 +0000 (23:15 +0000)]
Add support for a patch version to the cmake system.
Patch by Brad King
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206425
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 16 Apr 2014 22:38:02 +0000 (22:38 +0000)]
[c++11] Tidy up AsmPrinter.cpp.
Range'ify loops and tidy up some by-reference handling. No functional
change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206422
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 16 Apr 2014 22:37:58 +0000 (22:37 +0000)]
iterator_range for machine block terminators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206421
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 16 Apr 2014 17:45:04 +0000 (17:45 +0000)]
Added new functionality to LLVM C API to use DiagnosticInfo to handle errors
Patch by: Darren Powell
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206407
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 16 Apr 2014 17:09:20 +0000 (17:09 +0000)]
Replacing a non-ASCII character in a comment with an ASCII character. Fixes a C4819 warning in MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206403
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Wed, 16 Apr 2014 16:53:41 +0000 (16:53 +0000)]
Allow diagnostic handlers to check for optimization remarks.
Summary:
When optimization remarks are enabled via the driver flag -Rpass, we
should allow the FE diagnostic handler to check if the given pass name
needs a diagnostic.
We were unconditionally checking the pattern defined in opt's
-pass-remarks flag. This was causing the FE to not emit any diagnostics.
Reviewers: qcolombet
CC: llvm-commits
Differential Revision: http://reviews.llvm.org/D3362
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206400
91177308-0d34-0410-b5e6-
96231b3b80d8
Konrad Anheim [Wed, 16 Apr 2014 16:45:18 +0000 (16:45 +0000)]
Test commit - Added a new line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206399
91177308-0d34-0410-b5e6-
96231b3b80d8
Matheus Almeida [Wed, 16 Apr 2014 16:28:59 +0000 (16:28 +0000)]
[mips] Use TwoOperandAliasConstraint for shift instructions.
This enables TableGen to generate an additional two operand
matcher for our shift_rotate_imm and shift_rotate_reg class of instructions.
The tests were also updated so that they include now encoding information
for all affected instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206398
91177308-0d34-0410-b5e6-
96231b3b80d8
Matheus Almeida [Wed, 16 Apr 2014 15:48:55 +0000 (15:48 +0000)]
[mips] Add initial support for NaN2008 in the back-end.
This is so that EF_MIPS_NAN2008 is set if we are using IEEE 754-2008
NaN encoding (-mnan=2008). This patch also adds support for parsing
'.nan legacy' and '.nan 2008' assembly directives. The handling of
these directives should match GAS' behaviour i.e., the last directive
in use sets the ELF header bit (EF_MIPS_NAN2008).
Differential Revision: http://reviews.llvm.org/D3346
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206396
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 16 Apr 2014 15:28:06 +0000 (15:28 +0000)]
ARM64: silence sign-comparison warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206393
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 16 Apr 2014 15:28:02 +0000 (15:28 +0000)]
AArch64/ARM64: port some NEON tests to ARM64
These ones used completely different sets of intrinsics, so the only way to do
it is create a separate ARM64 copy and change them all.
Other than that, CodeGen was straightforward, no deficiencies detected here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206392
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 16 Apr 2014 15:27:52 +0000 (15:27 +0000)]
AArch64/ARM64: produce correct relocation for conditional branches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206391
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 16 Apr 2014 14:38:27 +0000 (14:38 +0000)]
[mips] Indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206389
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 16 Apr 2014 13:58:57 +0000 (13:58 +0000)]
[mips] Fix emission of '.option pic0' for MIPS-IV.
Summary: This was a case of incorrect usage of hasMips64() vs isABI_N64()
Reviewers: matheusalmeida, dsanders
Reviewed By: dsanders
Differential Revision: http://reviews.llvm.org/D3398
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206388
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 16 Apr 2014 12:29:08 +0000 (12:29 +0000)]
[mips] Correct r206370 to account for non-Linux targets using the small data section.
This should fix the ninja-x64-msvc-RA-centos6 builder.
I suspect the check in MipsSubtarget.cpp is incorrect and is really trying to
check for a bare-metal target rather and anything other than linux. I'll
investigate this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206385
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 16 Apr 2014 12:12:19 +0000 (12:12 +0000)]
[asan] add two new hidden compile-time flags for asan: asan-instrumentation-with-call-threshold and asan-memory-access-callback-prefix. This is part of the workaround for PR17409 (instrument huge functions with callbacks instead of inlined code). These flags will also help us experiment with kasan (kernel-asan) and clang
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206383
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 16 Apr 2014 12:03:56 +0000 (12:03 +0000)]
ARM64: specify triple so that Linux tests pass
Now that Linux is trying to reparse all inline asm it chokes on the different
comment character in this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206382
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 16 Apr 2014 11:53:07 +0000 (11:53 +0000)]
AArch64/ARM64: add another set of tests from AArch64
Another batch with no code changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206381
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 16 Apr 2014 11:52:55 +0000 (11:52 +0000)]
AArch64/ARM64: port across stub handling for ELF C++ exceptions.
The most important part here is that we should actuall emit the stubs we refer
to in the exception table, but as a side issue this uses more sensible & GCC
compatible representations for some of the bits of information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206380
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 16 Apr 2014 11:52:51 +0000 (11:52 +0000)]
ARM64: use 32-bit moves for constants where possible.
If we know that a particular 64-bit constant has all high bits zero, then we
can rely on the fact that 32-bit ARM64 instructions automatically zero out the
high bits of an x-register. This gives the expansion logic less constraints to
satisfy and so sometimes allows it to pick better sequences.
Came up while porting test/CodeGen/AArch64/movw-consts.ll: this will allow a
32-bit MOVN to be used in @test8 soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206379
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 16 Apr 2014 11:52:40 +0000 (11:52 +0000)]
ARM64: use the integrated assembler on ELF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206378
91177308-0d34-0410-b5e6-
96231b3b80d8
Matheus Almeida [Wed, 16 Apr 2014 11:46:59 +0000 (11:46 +0000)]
[mips] Emit '.set nomicromips' before a function's entry label
if not in micromips mode.
The test (elf_st_other.ll) was renamed as the name and description didn't
make sense as the test wasn't checking any symbol table entry.
Differential Revision: http://reviews.llvm.org/D3346
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206377
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 16 Apr 2014 11:15:57 +0000 (11:15 +0000)]
Fixing a compile error in debug versions of MSVC. It seems that the range-based for loop is confused by the DEBUG macro expansion unless a compound statement is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206376
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 16 Apr 2014 11:14:28 +0000 (11:14 +0000)]
[LCG] Stop playing fast and loose with reference members and assignment.
It doesn't work. I'm still cleaning up all the places where I blindly
followed this pattern. There are more to come in this code too.
As a benefit, this lets the default copy and move operations Just Work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206375
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 16 Apr 2014 10:48:27 +0000 (10:48 +0000)]
[Allocator] Make BumpPtrAllocator movable and move assignable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206372
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 16 Apr 2014 10:23:37 +0000 (10:23 +0000)]
[mips] Correct callee saved list for the N32 ABI and enable test
Summary: Depends on D3339
Reviewers: matheusalmeida, vmedic
Reviewed By: matheusalmeida
Differential Revision: http://reviews.llvm.org/D3340
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206371
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 16 Apr 2014 09:59:46 +0000 (09:59 +0000)]
[mips] Add calling convention tests covering O32, N32, and N64.
Summary:
I had difficulty finding tests for the N32 and N64 ABI so I've added a
collection of calling convention tests based on the document MIPS ABIs
Described (MD00305), the MIPSpro N32 Handbook, and the SYSV ABI. Where the
documents/implementations disagree, I've used GCC to resolve the conflict.
A few interesting details:
* For N32, LLVM uses 64-bit pointers when saving $ra despite pointers being
32-bit. I've yet to find a supporting statement in the ABI documentation but
the current behaviour matches GCC.
* For O32, the non-variable portion of a varargs argument list is also subject
to the rule that floating-point is passed via GPR's (on N32/N64 only the
variable portion is subject to this rule). This agrees with GCC's behaviour
and the SYSV ABI but contradicts part of the MIPSpro N32 Handbook which talks about O32's behaviour.
* The N32 implementation has the wrong callee-saved register list.
(I already have a fix for this but will commit it as a follow-up).
I've left RUN-TODO lines in for O32 on MIPS64. I don't plan to support this case
for now but we should revisit it.
Reviewers: matheusalmeida, vmedic
Reviewed By: matheusalmeida
Differential Revision: http://reviews.llvm.org/D3339
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206370
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 16 Apr 2014 09:21:29 +0000 (09:21 +0000)]
[Allocator] Nuke to useless functions. The implicit ones are sufficient
here (obviously).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206369
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 16 Apr 2014 09:13:44 +0000 (09:13 +0000)]
ARM64: explicitly ask for Apple NEON syntax so test passes on Linux
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206368
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 16 Apr 2014 09:03:25 +0000 (09:03 +0000)]
ARM64: mark x7 as used when an i128 gets shunted onto the stack.
The second half of a split i128 was ending up in x7, which is not a good thing.
This is another part of PR19432.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206366
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 16 Apr 2014 09:03:09 +0000 (09:03 +0000)]
DAGCombiner: don't optimise non-existant litpool load
This particular DAG combine is designed to kick in when both ConstantFPs will
end up being loaded via a litpool, however those nodes have a semi-legal
status, dictated by isFPImmLegal so in some cases there wouldn't have been a
litpool in the first place. Don't try to be clever in those circumstances.
Picked up while merging some AArch64 tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206365
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Wed, 16 Apr 2014 08:30:32 +0000 (08:30 +0000)]
Simplify a static_assert so VS2013 can build it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206363
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 16 Apr 2014 06:22:53 +0000 (06:22 +0000)]
COFF: fix an off by one error
Adjust the tests to validate the number of auxiliary entries used to store the
filename.
Thanks to majnemer's sharp eye for catching the missing - 1 in the round up
calculation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206359
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 16 Apr 2014 06:10:51 +0000 (06:10 +0000)]
Convert SelectionDAG::getVTList to use ArrayRef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206357
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 16 Apr 2014 04:21:27 +0000 (04:21 +0000)]
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206356
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 16 Apr 2014 04:15:32 +0000 (04:15 +0000)]
COFF: add support for .file symbols
Add support for emitting .file records. This is mostly a quality of
implementation change (more complete support for COFF file emission) that was
noticed while working on COFF file emission for Windows on ARM.
A .file record is emitted as a symbol with storage class FILE (103) and the name
".file". A series of auxiliary format 4 records follow which contain the file
name. The filename is stored as an ANSI string and is padded with NULL if the
length is not a multiple of COFF::SymbolSize (18).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206355
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 16 Apr 2014 04:15:29 +0000 (04:15 +0000)]
tools: fix invalid printing, buffer overrun in llvm-readobj
All auxiliary records are consumed when accessing a File record.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206354
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 16 Apr 2014 04:15:25 +0000 (04:15 +0000)]
Target: whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206353
91177308-0d34-0410-b5e6-
96231b3b80d8