Commit Graph

107517 Commits

Author SHA1 Message Date
Rafael Espindola
c359193486 Update to not depend on "llvm-objdump -d -symbolize".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217047 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 16:16:02 +00:00
Tom Stellard
ce4caf146f R600/SI: Add a pattern for i64 and in a branch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217041 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 15:22:41 +00:00
Tom Stellard
2381dfeab5 R600/SI: Fix typos in SIInstrInfo::areLoadsFromSameBasePtr()
This fixes a crash in the OpenCV test:
ImgprocWarpResizeArea/Resize.Mat/16

There is no test case for this, because this failure depends on a
specific ordering of the loads, which could easily change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217040 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 15:22:39 +00:00
Renato Golin
218805d21d Check-label a bit more specific
Sometimes, the .file could be reordered and it'd identify the ldr in the filename as a bad match.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217037 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 13:32:08 +00:00
Joerg Sonnenberger
b9f34663cb Document !and. Fix !shl and friends -- they provide binary operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217034 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 13:17:03 +00:00
Iain Sandoe
b449c2885f Fix configure and make build of llvm examples.
Replaced link component 'jit' with 'mcjit'.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217032 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 13:12:16 +00:00
Benjamin Kramer
a80ff26688 Add override to overriden virtual methods, remove virtual keywords.
No functionality change. Changes made by clang-tidy + some manual cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217028 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 11:41:21 +00:00
Yaron Keren
8f2394e5af Fix ambiguous call to make_unique and clang-format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217023 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 08:22:30 +00:00
Alexander Potapenko
42ebff8c99 Follow-up for r217020: actually commit the fix for PR20800,
revert the accidentally committed changes to LLVMSymbolize.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217021 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 07:37:20 +00:00
Alexander Potapenko
fac68d2d70 Fix PR20800: correctly calculate the offset of the subq instruction when generating compact unwind info.
This CL replaces the constant DarwinX86AsmBackend.PushInstrSize with a method
that lets the backend account for different sizes of "push %reg" instruction
sizes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217020 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 07:11:34 +00:00
Juergen Ributzka
847547086d Reapply r216805 "[MachineCombiner][AArch64] Use the correct register class for MADD, SUB, and OR.""
This reapplies r216805 with a fix to a copy-past error, which resulted in an
incorrect register class.

Original commit message:
Select the correct register class for the various instructions that are
generated when combining instructions and constrain the registers to the
appropriate register class.

This fixes rdar://problem/18183707.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217019 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 07:07:10 +00:00
Craig Topper
732b026119 Recommit "Use unique_ptr to manager FilterChooser ownership."
Just using insert of a pair this time instead of emplace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217018 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 06:07:54 +00:00
Craig Topper
6426140b90 Revert "Use unique_ptr to manager FilterChooser ownership."
std::map::emplace isn't working on some of the bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217015 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 05:59:23 +00:00
Craig Topper
e2d40936f6 Use unique_ptr to manager FilterChooser ownership.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217014 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 05:49:09 +00:00
Craig Topper
5c581578ff Implement move constructor and remove copy constructor for Filter objects in FixedLenDecoderEmitter. Also remove unused copy constructor of FilterChooser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217013 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 05:49:07 +00:00
Lang Hames
ef279f96e5 [MCJIT] Make llvm-rtdyld process eh_frame sections in -verify mode (accidentally
left out of r217010).

Also remove a crufty debugging output statement that was accidentally left in.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217011 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 05:42:52 +00:00
Lang Hames
5ae2647405 [MCJIT] Add a 'section_addr' builtin function to RuntimeDyldChecker.
The syntax of the new builtin is 'section_addr(<filename>, <section-name>)'
(similar to the stub_addr builtin, but without a symbol name). It returns the
base address of the given section in the given object file. This builtin makes
it possible to refer to the contents of sections that cannot contain symbols,
e.g. sections added by the linker itself, like __eh_frame.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217010 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 05:01:46 +00:00
Juergen Ributzka
dd7a7107c1 [FastISel][AArch64] Add target-dependent instruction selection for Add/Sub.
There is already target-dependent instruction selection support for Adds/Subs to
support compares and the intrinsics with overflow check. This takes advantage of
the existing infrastructure to also support Add/Sub, which allows the folding of
immediates, sign-/zero-extends, and shifts.

This fixes rdar://problem/18207316.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217007 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 01:38:36 +00:00
Nick Kledzik
46d52b1627 Fix test case to match correct llvm-objdump output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217006 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 01:34:58 +00:00
Nick Kledzik
3ab3a82f72 Replace printf with outs() <<
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217005 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 01:12:52 +00:00
Sanjay Patel
ae77bf49f4 Change name of copyFlags() to copyIRFlags(). Add convenience method for logical 'and' of all flags. NFC.
Adding 'IR' to the names in an attempt to be less ambiguous about the flags we're dealing with here.

The 'and' method is needed by the SLPVectorizer (PR20802) and possibly other passes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217004 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 01:06:50 +00:00
Hal Finkel
fbe935edc1 [CFLAA] Remove one final initializer list
Maybe MSVC will be happy now...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217000 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 00:06:47 +00:00
Hal Finkel
b38c0b8f58 [CFLAA] And even more MSVC fixes
Remove a couple more initializer lists and constexpr dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216998 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 23:50:01 +00:00
Chris Bieneman
16632ce4c7 Cleaning up remaining static initializers in Signals.inc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216996 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 23:48:13 +00:00
Hal Finkel
fa5d491ae4 [CFLAA] More cleanup for MSVC
Remove more initializer lists, etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216994 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 23:29:48 +00:00
Pete Cooper
0a304f06b1 Tablegen scheduling models don't reference empty itineraries as of r216919, so don't emit the unused itinerary variables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216993 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 23:23:34 +00:00
Hal Finkel
8de4282206 [CFLAA] No initializer lists for MSVC
MSVC 2012 does not understand initializer lists; remove them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216991 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 22:52:30 +00:00
Renato Golin
418103c4d4 Missing test from r216989
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216990 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 22:46:18 +00:00
Renato Golin
ddcf3bd0a0 Only emit movw on ARMv6T2+
Fix PR18364.

Patch by Dimitry Andric.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216989 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 22:45:13 +00:00
David Blaikie
4becee113c unique_ptrify passing the TargetMachine to ExecutionEngine::MCJITCtor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216988 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 22:41:07 +00:00
Hal Finkel
41b6e327f7 [CFLAA] Remove tautological comparison
Fixes this (the warning is right, the unsigned value is not negative):
lib/Analysis/StratifiedSets.h:689:53: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
  bool inbounds(StratifiedIndex N) const { return N >= 0 && N < Links.size(); }

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216987 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 22:36:58 +00:00
Juergen Ributzka
79ec2ed417 [FastISel][AArch64] Use the target-dependent selection code for shifts first.
This uses the target-dependent selection code for shifts first, which allows us
to create better code for shifts with immediates and sign-/zero-extend folding.

Vector type are not handled yet and the code falls back to target-independent
instruction selection for these cases.

This fixes rdar://problem/17907920.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216985 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 22:33:57 +00:00
Juergen Ributzka
4919b697c2 [FastISel][AArch64] Use a new helper function to determine if a value type is supported. NFCI.
FastISel for AArch64 supports more value types than are actually legal. Use a
dedicated helper function to reflect this.

It is very similar to the isLoadStoreTypeLegal function, with the exception
that vector types are not supported yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216984 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 22:33:53 +00:00
Sean Silva
73d86aa56a Nuke MCAnalysis.
The code is buggy and barely tested. It is also mostly boilerplate.
(This includes MCObjectDisassembler, which is the interface to that
functionality)

Following an IRC discussion with Jim Grosbach, it seems sensible to just
nuke the whole lot of functionality, and dig it up from VCS if
necessary (I hope not!).

All of this stuff appears to have been added in a huge patch dump (look
at the timeframe surrounding e.g. r182628) where almost every patch
seemed to be untested and not reviewed before being committed.
Post-review responses to the patches were never addressed. I don't think
any of it would have passed pre-commit review.

I doubt anyone is depending on this, since this code appears to be
extremely buggy. In limited testing that Michael Spencer and I did, we
couldn't find a single real-world object file that wouldn't crash the
CFG reconstruction stuff. The symbolizer stuff has O(n^2) behavior and
so is not much use to anyone anyway. It seemed simpler to remove them as
a whole. Most of this code is boilerplate, which is the only way it was
able to scrape by 60% coverage.

HEADSUP: Modules folks, some files I nuked were referenced from
include/llvm/module.modulemap; I just deleted the references. Hopefully
that is the right fix (one was a FIXME though!).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216983 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 22:32:20 +00:00
Eric Christopher
d5dd8ce2a5 Reinstate "Nuke the old JIT."
Approved by Jim Grosbach, Lang Hames, Rafael Espindola.

This reinstates commits r215111, 215115, 215116, 215117, 215136.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216982 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 22:28:02 +00:00
Hal Finkel
4437658aff [CFLAA] LLVM_CONSTEXPR -> const
The number is just a constant, and this should make MSVC happy (or at least
happier).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216981 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 22:26:06 +00:00
Robin Morisset
76b55cc4b1 [X86] Allow atomic operations using immediates to avoid using a register
The only valid lowering of atomic stores in the X86 backend was mov from
register to memory. As a result, storing an immediate required a useless copy
of the immediate in a register. Now these can be compiled as a simple mov.

Similarily, adding/and-ing/or-ing/xor-ing an
immediate to an atomic location (but through an atomic_store/atomic_load,
not a fetch_whatever intrinsic) can now make use of an 'add $imm, x(%rip)'
instead of using a register. And the same applies to inc/dec.

This second point matches the first issue identified in
  http://llvm.org/bugs/show_bug.cgi?id=17281

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216980 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 22:16:29 +00:00
Hal Finkel
ba709096bc [CFLAA] constexpr -> LLVM_CONSTEXPR
Attempt to fix the MSVC build by not using constexpr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216979 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 22:13:00 +00:00
Hal Finkel
e1b1cac5ad Add pass-manager flags to use CFL AA
Add -use-cfl-aa (and -use-cfl-aa-in-codegen) to add CFL AA in the default pass
managers (for easy testing).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216978 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 22:12:54 +00:00
Hans Wennborg
d52e9a143f BumpPtrAllocator: use uintptr_t when aligning addresses to avoid undefined behaviour
In theory, alignPtr() could push a pointer beyond the end of the current slab, making
comparisons with that pointer undefined behaviour. Use an integer type to avoid this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216973 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 21:51:35 +00:00
Kostya Serebryany
891198b358 [asan] Assign a low branch weight to ASan's slow path, patch by Jonas Wagner. This speeds up asan (at least on SPEC) by 1%-5% or more. Also fix lint in dfsan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216972 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 21:46:51 +00:00
Matt Arsenault
2aab51a118 R600/SI: Relax some ordering in tests.
This will help with enabling misched

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216971 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 21:45:50 +00:00
Hal Finkel
bf301d5670 Add a CFL Alias Analysis implementation
This provides an implementation of CFL alias analysis (including some
supporting data structures). Currently, we don't have any extremely fancy
features, sans some interprocedural analysis (i.e. no field sensitivity, etc.),
and we do best sitting behind BasicAA + TBAA. In such a configuration, we take
~0.6-0.8% of total compile time, and give ~7-8% NoAlias responses to queries
TBAA and BasicAA couldn't answer when bootstrapping LLVM. In testing this on
other projects, we've seen up to 10.5% of queries dropped by BasicAA+TBAA
answered with NoAlias by this algorithm.

Patch by George Burgess IV (with minor modifications by me -- mostly adapting
some BasicAA tests), thanks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216970 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 21:43:13 +00:00
Juergen Ributzka
a2e22cd4cd [FastISel][AArch64] Move over to target-dependent instruction selection only.
This change moves FastISel for AArch64 to target-dependent instruction selection
only. This change replicates the existing target-independent behavior, therefore
there are no changes to the unit tests or new tests.

Future changes will take advantage of this change and update functionality
and unit tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216955 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 21:32:54 +00:00
Juergen Ributzka
37753c5f9d [FastISel] Provide the option to skip target-independent instruction selection. NFC.
This allows the target to disable target-independent instruction selection and
jump directly into the target-dependent instruction selection code.

This can be beneficial for targets, such as AArch64, which could emit much
better code, but never got a chance to do so, because the target-independent
instruction selector was able to find an instruction sequence.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216947 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 21:07:44 +00:00
Yi Jiang
cb2522448c Generate extract for in-tree uses if the use is scalar operand in vectorized instruction. radar://18144665
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216946 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 21:00:39 +00:00
Matt Arsenault
9c21df64a4 R600/SI: Fix hardcoded register numbers in test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216944 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 20:43:07 +00:00
Sanjay Patel
96b466c066 Refactor LowerFABS and LowerFNEG into one function (x86) (NFC)
We duplicate ~30 lines of code to lower FABS and FNEG for x86, so this patch combines them into one function. 
No functional change intended, so no additional test cases. Test-suite behavior is unchanged.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216942 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 20:24:47 +00:00
Matt Arsenault
ef02f8eb0b cmake: Don't reject unknown cpp files that start with .
Some editors create hidden file backups in the same
directory as the file, and it's annoying when cmake
errors on them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216941 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 20:20:43 +00:00
Robin Morisset
cc99164448 Fix MemoryDependenceAnalysis in cases where QueryInstr is a CmpXchg or a AtomicRMW
Summary:
MemoryDependenceAnalysis is currently cautious when the QueryInstr is an atomic
load or store, but I forgot to check for atomic cmpxchg/atomicrmw. This patch
is a way of fixing that, and making it less brittle (i.e. no risk that I forget
another possible kind of atomic, even if the IR ends up changing in the future),
by adding a fallback checking mayReadOrWriteFromMemory.

Thanks to Philip Reames for finding this bug and suggesting this solution in
http://reviews.llvm.org/D4845

Sadly, I don't see how to add a test for this, since the passes depending on
MemoryDependenceAnalysis won't trigger for an atomic rmw anyway. Does anyone
see a way for testing it?

Test Plan: none possible at first sight

Reviewers: jfb, reames

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216940 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 20:17:52 +00:00