Commit Graph

88385 Commits

Author SHA1 Message Date
Jordan Rose
9b1f44b147 Add basic fix-its to SMDiagnostic.
Like Clang's FixItHint, SMFixIt represents an insertion, replacement, or
removal of source text. One or more fix-its can be emitted as part of
a diagnostic, and will be printed below the source range line to show the
user how they can fix their code.

Currently, the only client of SMFixIt is clang-tblgen; thus, the tests for
this behavior live in clang/test/TableGen/tg-fixits.td. If/when SMFixIt is
adopted within LLVM itself, those tests should be moved to the LLVM suite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172086 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 18:50:15 +00:00
Jordan Rose
b50df4a3df TableGen: Keep track of superclass reference ranges.
def foo : bar;
          ~~~

This allows us to produce more precise diagnostics about a certain
superclass, and even provide fixits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172085 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 18:50:11 +00:00
Jordan Rose
d122009e57 TableGen: record anonymous instantiations of classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172084 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 18:50:05 +00:00
Jakob Stoklund Olesen
4aebce8321 Allow hasProperty() to be called on bundle-internal instructions.
When calling hasProperty() on an instruction inside a bundle, it should
always behave as if IgnoreBundle was passed, and just return properties
for the current instruction.

Only attempt to aggregate bundle properties whan asked about the bundle
header.

The assertion fires on existing ARM test cases without this fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172082 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 18:42:44 +00:00
David Greene
5e1b31bf55 Fix Alias Bug
Use memcpy to do type punning instead of a cast.  A cast or similar
operation through a union breaks strict aliasing rules.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172081 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 18:17:54 +00:00
Nadav Rotem
c560bf638b LoopVectorizer: Fix a bug in the vectorization of BinaryOperators. The BinaryOperator can be folded to an Undef, and we don't want to set NSW flags to undef vals.
PR14878



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172079 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 17:34:39 +00:00
Tim Northover
12da505d93 Remove locale-dependence of enum mangling and use existing function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172077 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 16:47:31 +00:00
Tim Northover
88abcde3b4 Make TableGen mangle operand method names before putting in enum.
The purpose of this patch is to allow PredicateMethods to be set to something
like "isUImm<8>", calling a C++ template method to reduce code duplication. For
this to work, the PredicateMethod must be mangled into a valid C++ identifier
for insertion into an enum.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172073 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 15:17:36 +00:00
Joey Gouly
2b8f6ae6b7 Fix a copy/paste error in the IR Linker, casting an ArrayType instead of a VectorType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172054 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 10:49:36 +00:00
Joey Gouly
1d505a33f9 Fix TryToShrinkGlobalToBoolean in GlobalOpt, so that it does not discard address spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172051 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 10:31:11 +00:00
Sean Silva
8a0f3f7811 docs: fix broken link.
PR14889

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172046 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 06:39:37 +00:00
NAKAMURA Takumi
1930fbf3eb Signal.h: Add <cstdio> for FILE*, since r171989.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172044 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 05:23:59 +00:00
Michael Gottesman
5dc300107b [ObjCARC Debug Message] Added debug message when we convert an autorelease into an autoreleaseRV.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172034 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 02:03:50 +00:00
Douglas Gregor
69a2d6f55a Fix a race condition in the lock-file manager: once the lock file is
gone, check for the actual file we care about.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172033 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 02:01:35 +00:00
Douglas Gregor
06c7008e30 Fix a race condition in llvm::sys::path::unique_file: when we end up
failing to create the unique file because the path doesn't exist,
don't fail if someone else manages to create the path before we do.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172032 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 01:58:46 +00:00
Jakob Stoklund Olesen
b11f050434 Support headerless bundles in MachineInstr::hasProperty().
This function can still work without a BUNDLE header instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172029 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 01:29:42 +00:00
Manman Ren
86441169da Stack Alignment: throw error if we can't satisfy the minimal alignment
requirement when creating stack objects in MachineFrameInfo.

Add CreateStackObjectWithMinAlign to throw error when the minimal alignment
can't be achieved and to clamp the alignment when the preferred alignment
can't be achieved. Same is true for CreateVariableSizedObject.
Will not emit error in CreateSpillStackObject or CreateStackObject.

As long as callers of CreateStackObject do not assume the object will be
aligned at the requested alignment, we should not have miscompile since
later optimizations which look at the object's alignment will have the correct
information.

rdar://12713765


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172027 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 01:10:10 +00:00
Michael J. Spencer
7932c41884 [Object][Archive] Fix name handling with bsd style long names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172026 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 01:05:34 +00:00
Jakub Staszak
674be02d52 Fix include guards so they exactly match file names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172025 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 00:45:19 +00:00
Michael J. Spencer
bf82b07f5f [Object][Archive] Apparently StringRef::getAsInteger for APInt accepts spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172022 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 00:07:38 +00:00
Bill Wendling
1db9b6957c Revert s/Raw/getBitMask/g name change. This is possibly causing LTO test hangings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172020 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 23:36:50 +00:00
Michael J. Spencer
e92800dd53 [Object][Archive] Use uint64_t instead of APInt. It is significantly faster.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172015 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 22:58:43 +00:00
Joel Jones
5573de8493 Fix description of ARMOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172011 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 22:34:16 +00:00
Nadav Rotem
14925e6b88 ARM Cost model: Use the size of vector registers and widest vectorizable instruction to determine the max vectorization factor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172010 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 22:29:00 +00:00
David Greene
d2f8216ba4 Disable -Wuninitialized for gcc
If the compiler is gcc, disable variants of -Wuninitialized depending
on the gcc version.  This gets a lot of false positive warnings out of
the build.

Generate a new configure for the gcc -Wno-uninitialized fix.

Pick up -Wno-uninitialized from configure

Add the option -Wno[-maybe]-uninitialized as determined by configure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172006 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 22:11:13 +00:00
Evan Cheng
78ec0255d9 Fix a DAG combine bug visitBRCOND() is transforming br(xor(x, y)) to br(x != y).
It cahced XOR's operands before calling visitXOR() but failed to update the
operands when visitXOR changed the XOR node.

rdar://12968664


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171999 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 20:56:40 +00:00
Argyrios Kyrtzidis
f48acd5ecd Move the internal PrintStackTrace function that is used for llvm::sys::PrintStackTraceOnErrorSignal(),
into a new function llvm::sys::PrintStackTrace, so that it's available to clients for logging purposes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171989 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 19:42:40 +00:00
Michael Gottesman
5581115075 [ObjCARC Debug Messages] This is a squashed commit of 3x debug message commits ala echristo's suggestion.
1. Added debug messages when in OptimizeIndividualCalls we move calls into predecessors and then erase the original call.
2. Added debug messages when in the process of moving calls in ObjCARCOpt::MoveCalls we create new RR and delete old RR.
3. Added a debug message when we visit a specific retain instruction in ObjCARCOpt::PerformCodePlacement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171988 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 19:23:24 +00:00
Jakob Stoklund Olesen
ebed123c5c Don't print bundle flags.
The bundle flags are used by MachineBasicBlock::print(), they don't need
to clutter up individual MachineInstrs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171986 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 18:35:09 +00:00
Jakob Stoklund Olesen
25377c8c6d Don't require BUNDLE headers in MachineInstr::getBundleSize().
It is possible to build MI bundles that don't begin with a BUNDLE
header. Add support for such bundles, counting all instructions inside
the bundle.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171985 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 18:28:16 +00:00
Benjamin Kramer
d9cc865787 LICM: Hoist insertvalue/extractvalue out of loops.
Fixes PR14854.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171984 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 18:12:03 +00:00
Sergei Larin
12cd49ae1d Fix a typo in MachineInstr::unbundleFromSucc() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171983 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 17:54:33 +00:00
Adhemerval Zanella
a1db5de9e7 PowerPC: EH adjustments
This patch adjust the r171506 to make all DWARF enconding pc-relative
for PPC64. It also adds the R_PPC64_REL32 relocation handling in MCJIT
(since the eh_frame will not generate PIC-relative relocation) and also
adds the emission of stubs created by the TTypeEncoding.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171979 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 17:08:15 +00:00
Shankar Easwaran
cde8168964 add hexagon flags in ELF.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171977 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 16:34:46 +00:00
David Tweed
73b984530f For some LLVM-as-library uses it is convenient to create a
subclass of TargetMachine which "forwards" all operations to an
existing internal TargetMachine member variable. In the usage context the
specific-machine class derived from TargetMachine is not visible,
only a reference to the generic base class TargetMachine. Although
getSubtargetImpl() is public in specific-machine classes derived from
TargetMachine, the TargetMachine class unfortunately has
getSubtargetImpl() protected (and accessing non-const members makes
abusing getSubtarget() unsuitable). Making it public in the base class
allows this forwarding pattern.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171976 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 16:21:47 +00:00
Dmitri Gribenko
a7303360ae Configure: if we compile with clang, check that it is not broken
Some linux distibutions (for example, Mageia 2, Fedora 17) ship Clang that is
essentially broken for the end user.  Clang can not find or compile libstdc++
headers.

The issue is that our configure prefers clang over gcc, thus selecting a broken
Clang when a working GCC is available.

Now we detect this issue by compiling a simple program.  If it does not
compile, configure stops with an error suggesting the user to select a
different compiler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171975 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 15:25:30 +00:00
Tim Northover
7bf2e1b9ef Check whether MCInst operand isImm before calling getImm.
When processing possible aliases, TableGen assumes that if an operand *can* be
an immediate, then it always *will* be. This is incorrect for the AArch64
backend. This patch inserts a check in the generated code to make sure isImm is
true first.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171972 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 13:32:04 +00:00
Tim Northover
2c8cf4b404 Refactor to expose RTLIB calls to targets.
fp128 is almost but not quite completely illegal as a type on AArch64. As a
result it needs to have a register class (for argument passing mainly), but all
operations need to be lowered to runtime calls. Currently there's no way for
targets to do this (without duplicating code), as the relevant functions are
hidden in SelectionDAG. This patch changes that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171971 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 13:18:15 +00:00
Manuel Klimek
b1349fa3c5 Incrase the number of parameters for AlignedCharArrayUnion.
We need this to correctly fix ASTMatchers/ASTTypeTraits.h in clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171965 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 10:39:16 +00:00
Bill Wendling
53208a91a0 Alter the hasing computation when inserting into the folding set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171960 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 09:26:23 +00:00
Nadav Rotem
1977675a50 add -march to the test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171956 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 07:04:23 +00:00
Sean Silva
699b870556 tblgen: use an early return to reduce indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171954 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 05:28:12 +00:00
Nadav Rotem
13f8cf55d4 Efficient lowering of vector sdiv when the divisor is a splatted power of two constant.
PR 14848. The lowered sequence is based on the existing sequence the target-independent
DAG Combiner creates for the scalar case.

Patch by Zvi Rackover.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171953 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 05:14:33 +00:00
Sean Silva
9cceede447 tblgen: Factor out common code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171951 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 04:49:14 +00:00
Eric Christopher
1ced208be9 Last in the series of removing unnecessary '0' arguments for
address space. Reordered the EmitULEB128IntValue arguments to
make this easier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171949 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 03:52:05 +00:00
Andrew Trick
47579cf390 MIsched: add an ILP window property to machine model.
This was an experimental option, but needs to be defined
per-target. e.g. PPC A2 needs to aggressively hide latency.

I converted some in-order scheduling tests to A2. Hal is working on
more test cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171946 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 03:36:49 +00:00
NAKAMURA Takumi
2af949dddd [Object, DebugInfo] Make DWARFContext BE-aware.
test/DebugInfo/member-pointers.ll would not fail in targetting BE any more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171943 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 02:45:05 +00:00
Sean Silva
96a05b3074 TableGen/LangRef: link bang operators into the productionlist
Now BangOperator should be nicely hyperlinked.

Pointed out by Joel Jones.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171942 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 02:20:31 +00:00
Sean Silva
104f2b5e91 TableGen/LangRef: discuss specific C-like escapes
Suggested by Joel Jones.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171941 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 02:20:30 +00:00
Sean Silva
d155ffc03f docs: Fix mention of DefmID to MultiClassID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171940 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 02:20:24 +00:00