Commit Graph

123715 Commits

Author SHA1 Message Date
Silviu Baranga
dcc5220c3a Update comment to LoopAccessInfo after r251800. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252171 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 15:55:41 +00:00
James Molloy
ccdfbf603c [ARM] Compute known bits for ARMISD::CMOV
We can conservatively know that CMOV's known bits are the intersection of known bits for each of its operands. This helps PerformCMOVToBFICombine find more opportunities.

I tried hard to create a testcase for this and failed - we have to sufficiently confuse DAG.computeKnownBits which can see through all the cheap tricks I tried to narrow my larger testcase down :(

This code is actually exercised in CodeGen/ARM/bfi.ll, there's just no functional difference because DAG.computeKnownBits gets the right answer in that case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252168 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 15:21:58 +00:00
Aaron Ballman
0ef0b3e881 Fix a signed/unsigned mismatch warning; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252164 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 14:22:56 +00:00
Asaf Badouh
4283d55d7d revert rev. 252153 due to build failure on ubuntu
[X86][AVX512] add comi with Sae



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252154 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 08:55:54 +00:00
Asaf Badouh
1de7587fc4 [X86][AVX512] add comi with Sae
add builtin_ia32_vcomisd and builtin_ia32_vcomisd

Differential Revision: http://reviews.llvm.org/D14331



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252153 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 08:45:06 +00:00
James Molloy
a3bdb086c7 [SimplifyCFG] Tweak heuristic for merging conditional stores
We were correctly skipping dbginfo intrinsics and terminators, but the initial bailout wasn't, causing it to bail out on almost any block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252152 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 08:40:19 +00:00
Asaf Badouh
b1b2c5a457 [X86][AVX512] small bugfix in VPBROADCASTM
VPBROADCASTMW2D and VPBROADCASTMB2Q

Differential Revision: http://reviews.llvm.org/D14335


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252151 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 08:08:21 +00:00
Saleem Abdulrasool
c574acfe95 RuntimeDyld: fix -Wtype-limits
Adjust the casted type.  By casting to the same size rather than just the
signed-ness, we were asserting tautological statements.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252150 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 06:24:09 +00:00
Mehdi Amini
fe0b6a7f50 Fix LoopAccessAnalysis when potentially nullptr check are involved
Summary:
GetUnderlyingObjects() can return "null" among its list of objects,
we don't want to deduce that two pointers can point to the same
memory in this case, so filter it out.

Reviewers: anemet

Subscribers: dexonsmith, llvm-commits

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252149 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 05:49:43 +00:00
NAKAMURA Takumi
f8bc54d013 MCStreamer.h: Prune \return, corresponding to r252102. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252148 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 05:47:46 +00:00
Xinliang David Li
1a497c68b8 Fix a bug exposed by uses in CFE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252146 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 05:45:06 +00:00
Matt Arsenault
26c74838a7 AMDGPU: Also track whether SGPRs were spilled
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252145 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 05:27:10 +00:00
Matt Arsenault
35a96b82c1 AMDGPU: Print number user SGPRs
This doesn't quite match how SC prints it, which doesn't put it in a
comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252144 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 05:27:07 +00:00
Matt Arsenault
944e560063 AMDGPU: Disallow s[102:103] on VI in assembler
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252142 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 03:11:27 +00:00
Sanjoy Das
8e56fac5c1 [FunctionAttrs] Remove a loop, NFC refactor
Summary:
Remove the loop over the uses of the CallSite in ArgumentUsesTracker.
Since we have the `Use *` for actual argument operand, we can just use
pointer subtraction.

The time complexity remains the same though (except for a vararg
argument) -- `std::advance` is O(UseIndex) for the ArgumentList
iterator.

The real motivation is to make a later change adding support for operand
bundles simpler.

Reviewers: reames, chandlerc, nlewycky

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D14363

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252141 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 03:04:40 +00:00
Matt Arsenault
76b6b15dcd AMDGPU: Fix assert when legalizing atomic operands
The operand layout is slightly different for the atomic
opcodes from the usual MUBUF loads and stores.

This should only fix it on SI/CI. VI is still broken
because it still emits the addr64 replacement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252140 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 02:46:56 +00:00
Matt Arsenault
1c18f49544 AMDGPU: Make addr64 atomic operand order consistent
vaddr comes before srsrc in every other MUBUF instruction,
and is the order it is printed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252139 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 02:46:53 +00:00
Mehdi Amini
2d4640d60d Fix OSX build after r252118 (missing parameter for findModulesAndOffsets())
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252137 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 02:29:57 +00:00
Mehdi Amini
e91ef29f2a Remove empty lines
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252136 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 02:29:53 +00:00
Joseph Tremoulet
b0d280a588 [WinEH] Fix establisher param reg in CLR funclets
Summary:
The CLR's personality routine passes the pointer to the establisher frame
in RCX, not RDX.

Reviewers: pgavlin, majnemer, rnk

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D14343

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252135 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 02:20:07 +00:00
Sanjoy Das
4ae094a851 [IR] Add bounds checking to dataOperandHasImpliedAttr
This is similar to the bounds check added to paramHasAttr in r252073.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252130 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 01:53:26 +00:00
Kostya Serebryany
331a8c8a87 [libFuzzer] print a bit fewer lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252123 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 01:19:42 +00:00
Rafael Espindola
df00d95573 Go back to producing relocations for out of range symbols.
This brings back the behavior from before r252090 for out of range symbols.

Should bring some arm bots back.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252119 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 01:10:15 +00:00
Reid Kleckner
25a4bbe592 [Windows] Symbolize with llvm-symbolizer instead of dbghelp in a self-host
Summary:
llvm-symbolizer understands both PDBs and DWARF, so it is more likely to
succeed at symbolization. If llvm-symbolizer is unavailable, we will
fall back to dbghelp. This also makes our crash traces more similar
between Windows and Linux.

Reviewers: Bigcheese, zturner, chapuni

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12884

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252118 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 01:07:54 +00:00
Matt Arsenault
ecbecea873 AMDGPU: Add missing v2f64 fadd tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252117 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 01:03:11 +00:00
Matt Arsenault
f605f93174 AMDGPU: Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252116 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 01:03:08 +00:00
Xinliang David Li
0bf62648ad [PGO] Use template file to define runtime structures
With this change, instrumentation code and reader/write
code related to profile data structs are kept strictly
in-sync. THis will be extended to cfe and compile-rt 
references as well.

Differential Revision: http://reviews.llvm.org/D13843


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252113 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 00:47:26 +00:00
Mehdi Amini
8d079d54a3 Fix Abbrev emission in WriteIdentificationBlock
This Abbrev was not emitted and basically unused, just leacking there.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252110 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 00:25:03 +00:00
Rafael Espindola
11431b640c Fix pr24832.
It is pretty simple now that the yak is shaved.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252105 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 00:10:08 +00:00
Rafael Espindola
5ff5bdb1d8 Simplify now that emitValueToOffset always returns false.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252102 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 23:59:18 +00:00
Rafael Espindola
036ec43e83 Simplify .org processing and make it a bit more powerful.
We now always create the fragment, which lets us handle things like .org after
a .align.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252101 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 23:50:29 +00:00
Xinliang David Li
83b18356e6 Define portable macros for packed struct definitions:
1. A macro with argument: LLVM_PACKED(StructDefinition)
 2. A pair of macros defining scope of region with packing:
    LLVM_PACKED_START
     struct A { ... };
     struct B { ... };
    LLVM_PACKED_END

Differential Revision: http://reviews.llvm.org/D14337


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252099 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 23:42:56 +00:00
Davide Italiano
9496ef1fef [SimplifyLibCalls] New transformation: tan(atan(x)) -> x
This is enabled only under -ffast-math.
So, instead of emitting:
  4007b0:       50                      push   %rax
  4007b1:       e8 8a fd ff ff          callq  400540 <atanf@plt>
  4007b6:       58                      pop    %rax
  4007b7:       e9 94 fd ff ff          jmpq   400550 <tanf@plt>
  4007bc:       0f 1f 40 00             nopl   0x0(%rax)

for:
float mytan(float x) {
  return tanf(atanf(x));
}
we emit a single retq.

Differential Revision:	 http://reviews.llvm.org/D14302


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252098 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 23:36:56 +00:00
Kostya Serebryany
d022e94463 [libFuzzer] when choosing the next unit to mutate, give some preference to the most recent units (they are more likely to be interesting)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252097 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 23:22:25 +00:00
Sanjay Patel
15216161aa fix typo; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252096 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 23:21:13 +00:00
Sanjoy Das
a6cbeb82b6 [CaptureTracking] Support operand bundles conservatively
Summary:
Earlier CaptureTracking would assume all "interesting" operands to a
call or invoke were its arguments.  With operand bundles this is no
longer true.

Note: an earlier change got `doesNotCapture` working correctly with
operand bundles.

This change uses DSE to test the changes to CaptureTracking.  DSE is a
vehicle for testing only, and is not directly involved in this change.

Reviewers: reames, majnemer

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D14306

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252095 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 23:21:06 +00:00
Chris Bieneman
61dbca10ea [CMake] Bug 25059 - CMake libllvm.so.$MAJOR.$MINOR shared object name not compatible with ldconfig
Summary:
This change makes the CMake build system generate libraries for Linux and Darwin matching the makefile build system.

Linux libraries follow the pattern lib${name}.${MAJOR}.${MINOR}.so so that ldconfig won't pick it up incorrectly.

Darwin libraries are not versioned.

Note: On linux the non-versioned symlink is generated at install-time not build time. I plan to fix that eventually, but I expect that is good enough for the purposes of fixing this bug.

Reviewers: loladiro, tstellarAMD

Subscribers: axw, llvm-commits

Differential Revision: http://reviews.llvm.org/D13841

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252093 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 23:11:12 +00:00
Rafael Espindola
dc486f1719 Slightly saner handling of thumb branches.
The generic infrastructure already did a lot of work to decide if the
fixup value is know or not. It doesn't make sense to reimplement a very
basic case: same fragment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252090 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 23:00:39 +00:00
Quentin Colombet
aa1e5aa9df [x86] Teach the shrink-wrapping hooks to do the proper thing with Win64.
Win64 has some strict requirements for the epilogue. As a result, we disable
shrink-wrapping for Win64 unless the block that gets the epilogue is already an
exit block.

Fixes PR24193.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252088 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 22:37:28 +00:00
Eugene Zelenko
4e036ff575 Fix some Clang-tidy modernize warnings, other minor fixes.
Fixed warnings are: modernize-use-override, modernize-use-nullptr and modernize-redundant-void-arg.

Differential revision: http://reviews.llvm.org/D14312


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252087 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 22:32:32 +00:00
Justin Bogner
32968f1f6e PM: Rephrase PrintLoopPass as a wrapper around a new-style pass. NFC
Splits PrintLoopPass into a new-style pass and a PrintLoopPassWrapper,
much like we already do for PrintFunctionPass and PrintModulePass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252085 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 22:24:08 +00:00
Cong Hou
178bfbdf60 Add new interfaces to MBB for manipulating successors with probabilities instead of weights. NFC.
This is part-1 of the patch that replaces all edge weights in MBB by
probabilities, which only adds new interfaces. No functional changes.

Differential revision: http://reviews.llvm.org/D13908




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252083 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 21:37:58 +00:00
Simon Pilgrim
a4918675b2 Warning fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252078 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 21:27:22 +00:00
Sanjoy Das
a6abdebd6a [IR] Add a data_operand abstraction
Summary:
Data operands of a call or invoke consist of the call arguments, and
the bundle operands associated with the `call` (or `invoke`)
instruction.  The motivation for this change is that we'd like to be
able to query "argument attributes" like `readonly` and `nocapture`
for bundle operands naturally.

This change also provides a conservative "implementation" for these
attributes for any bundle operand, and an extension point for future
work.

Reviewers: chandlerc, majnemer, reames

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D14305

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252077 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 21:05:24 +00:00
Tom Stellard
7ba0c20d4c llvm-config: Add --has-rtti option
Summary:
This prints NO if LLVM was built with -fno-rtti or an equivalent flag
and YES otherwise.  The reasons to add -has-rtti rather than adding -fno-rtti
to --cxxflags are:

1. Building LLVM with -fno-rtti does not always mean that client
applications need this flag.

2. Some compilers have a different flag for disabling rtti, and the
compiler being used to build LLVM may not be the compiler being used to
build the application.

Reviewers: echristo, chandlerc, beanz

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11849

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252075 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 20:57:43 +00:00
Simon Pilgrim
0a019f7162 [X86][SSE] Add general memory folding for (V)INSERTPS instruction
This patch improves the memory folding of the inserted float element for the (V)INSERTPS instruction.

The existing implementation occurs in the DAGCombiner and relies on the narrowing of a whole vector load into a scalar load (and then converted into a vector) to (hopefully) allow folding to occur later on. Not only has this proven problematic for debug builds, it also prevents other memory folds (notably stack reloads) from happening.

This patch removes the old implementation and moves the folding code to the X86 foldMemoryOperand handler. A new private 'special case' function - foldMemoryOperandCustom - has been added to deal with memory folding of instructions that can't just use the lookup tables - (V)INSERTPS is the first of several that could be done.

It also tweaks the memory operand folding code with an additional pointer offset that allows existing memory addresses to be modified, in this case to convert the vector address to the explicit address of the scalar element that will be inserted.

Unlike the previous implementation we now set the insertion source index to zero, although this is ignored for the (V)INSERTPSrm version, anything that relied on shuffle decodes (such as unfolding of insertps loads) was incorrectly calculating the source address - I've added a test for this at insertps-unfold-load-bug.ll

Differential Revision: http://reviews.llvm.org/D13988

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252074 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 20:48:09 +00:00
Sanjoy Das
d13e995447 [IR] Add bounds checking to paramHasAttr
Summary:
This is intended to make a later change simpler.

Note: adding this bounds checking required fixing `X86FastISel`.  As
far I can tell I've preserved original behavior but a careful review
will be appreciated.

Reviewers: reames

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D14304

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252073 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 20:33:45 +00:00
David Blaikie
6d6131b03b Orc: Streamline some lambda usage in a unit test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252070 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 19:43:24 +00:00
Rafael Espindola
13ed0ecd8b Relax the check for ninja.
On fedora the ninja executable is called ninja-build :-(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252062 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 19:18:11 +00:00
Andrew Kaylor
80a2456665 Created new X86 FMA3 opcodes (FMA*_Int) that are used now for lowering of scalar FMA intrinsics.
Patch by Slava Klochkov 

The key difference between FMA* and FMA*_Int opcodes is that FMA*_Int opcodes are handled more conservatively. It is illegal to commute the 1st operand of FMA*_Int instructions as the upper bits of scalar FMA intrinsic result must be taken from the 1st operand, but such commute transformation would change those upper bits and invalidate the intrinsic's result.

Reviewers: Quentin Colombet, Elena Demikhovsky

Differential Revision: http://reviews.llvm.org/D13710



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252060 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04 18:10:41 +00:00