David Tweed [Wed, 9 Jan 2013 16:21:47 +0000 (16:21 +0000)]
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
Dmitri Gribenko [Wed, 9 Jan 2013 15:25:30 +0000 (15:25 +0000)]
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
Tim Northover [Wed, 9 Jan 2013 13:32:04 +0000 (13:32 +0000)]
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
Tim Northover [Wed, 9 Jan 2013 13:18:15 +0000 (13:18 +0000)]
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
Manuel Klimek [Wed, 9 Jan 2013 10:39:16 +0000 (10:39 +0000)]
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
Bill Wendling [Wed, 9 Jan 2013 09:26:23 +0000 (09:26 +0000)]
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
Nadav Rotem [Wed, 9 Jan 2013 07:04:23 +0000 (07:04 +0000)]
add -march to the test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171956
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Wed, 9 Jan 2013 05:28:12 +0000 (05:28 +0000)]
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
Nadav Rotem [Wed, 9 Jan 2013 05:14:33 +0000 (05:14 +0000)]
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
Sean Silva [Wed, 9 Jan 2013 04:49:14 +0000 (04:49 +0000)]
tblgen: Factor out common code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171951
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 9 Jan 2013 03:52:05 +0000 (03:52 +0000)]
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
Andrew Trick [Wed, 9 Jan 2013 03:36:49 +0000 (03:36 +0000)]
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
NAKAMURA Takumi [Wed, 9 Jan 2013 02:45:05 +0000 (02:45 +0000)]
[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
Sean Silva [Wed, 9 Jan 2013 02:20:31 +0000 (02:20 +0000)]
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
Sean Silva [Wed, 9 Jan 2013 02:20:30 +0000 (02:20 +0000)]
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
Sean Silva [Wed, 9 Jan 2013 02:20:24 +0000 (02:20 +0000)]
docs: Fix mention of DefmID to MultiClassID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171940
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Wed, 9 Jan 2013 02:17:14 +0000 (02:17 +0000)]
Inline this into its only caller.
It's clearer and additionally this gets rid of the usage of `DefmID`,
which doesn't really correspond to anything in the language (it was just
used in the name of this parsing function which parsed a `MultiClassID`
and returned that multiclass's record).
This area of the code still needs a lot of work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171938
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Wed, 9 Jan 2013 02:17:13 +0000 (02:17 +0000)]
tblgen: Reuse function that is 2 lines above.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171937
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Wed, 9 Jan 2013 02:11:57 +0000 (02:11 +0000)]
fix copy-paste-o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171936
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Wed, 9 Jan 2013 02:11:55 +0000 (02:11 +0000)]
docs: Bring TableGen syntax a bit closer to reality.
It's not just def's but actually a limited subset of Object's that are
allowed inside a multiclass.
Spotted by Joel Jones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171935
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 9 Jan 2013 01:57:54 +0000 (01:57 +0000)]
These functions have default arguments of 0 for the last arg. Use
them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171933
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 9 Jan 2013 01:35:34 +0000 (01:35 +0000)]
These functions have default arguments of 0 for the last arg. Use
them and add one where it seemed obvious that we wanted one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171932
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 9 Jan 2013 01:29:07 +0000 (01:29 +0000)]
ARM Cost Model: Add a basic vectorization unrolling test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171931
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 9 Jan 2013 01:20:59 +0000 (01:20 +0000)]
Remove the -licm pass from the loop vectorizer test because the loop vectorizer does it now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171930
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 9 Jan 2013 01:15:42 +0000 (01:15 +0000)]
Cost Model: Move the 'max unroll factor' variable to the TTI and add initial Cost Model support on ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171928
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 9 Jan 2013 01:02:19 +0000 (01:02 +0000)]
Add a getBundleEnd() function to go with the existing getBundleStart().
This is easier implemented now that bundle flags are symmetric.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171927
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Wed, 9 Jan 2013 00:53:25 +0000 (00:53 +0000)]
Add comment to the definition of Constant::isZeroValue().
(There already has a concise comment to the declaration.)
Thank Eric Christopher for his feedback!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171926
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 9 Jan 2013 00:32:55 +0000 (00:32 +0000)]
Forgot the namespace identifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171924
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 9 Jan 2013 00:32:08 +0000 (00:32 +0000)]
Add the integer value of the ConstantInt instead of the Constant* value.
This is causing some problems. The root cause is unknown at this time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171923
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Wed, 9 Jan 2013 00:13:41 +0000 (00:13 +0000)]
Consider expression "0.0 - X" as the negation of X if
- this expression is explicitly marked no-signed-zero, or
- no-signed-zero of this expression can be derived from some context.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171922
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 8 Jan 2013 22:22:06 +0000 (22:22 +0000)]
Move the string pools down into the units. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171905
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 8 Jan 2013 22:05:10 +0000 (22:05 +0000)]
Simplify the code a bit: MCRelaxableFragment doesn't need a separate getInstSize
method because getContents().size() already covers it. So computeFragmentSize
can use the generic MCEncodedFragment interface when querying both Data and
Relaxable fragments for contents sizes.
No change in functionality
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171903
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Kledzik [Tue, 8 Jan 2013 21:04:44 +0000 (21:04 +0000)]
Fix memory leak in YAML I/O.
Stop using BumpPtrAllocator for HNodes because
they have fields (vector, map) which require HNode
destructors to be run.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171896
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 8 Jan 2013 19:36:33 +0000 (19:36 +0000)]
Specify complete triple for fp128 tests.
This avoids FileCheck failing over different comment characters in
assembly (notably powerpc64 on Linux vs Darwin) and should fix David's
build-bot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171886
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Tue, 8 Jan 2013 19:01:28 +0000 (19:01 +0000)]
This patch produces the correct addend value for
an R_MIPS_GPREL16 relocation.
Contributer: Jack Carter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171882
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Tue, 8 Jan 2013 18:53:20 +0000 (18:53 +0000)]
This patch produces the correct pointer size
value in the 64 bit .eh_frame section.
It doesn't however allow exception handling to work
yet since it depends on the correct relocation model
being set in the ELF header flags.
Contributer: Jack Carter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171881
91177308-0d34-0410-b5e6-
96231b3b80d8
Preston Gurd [Tue, 8 Jan 2013 18:27:24 +0000 (18:27 +0000)]
Pad Short Functions for Intel Atom
The current Intel Atom microarchitecture has a feature whereby
when a function returns early then it is slightly faster to execute
a sequence of NOP instructions to wait until the return address is ready,
as opposed to simply stalling on the ret instruction until
the return address is ready.
When compiling for X86 Atom only, this patch will run a pass,
called "X86PadShortFunction" which will add NOP instructions where less
than four cycles elapse between function entry and return.
It includes tests.
This patch has been updated to address Nadav's review comments
- Optimize only at >= O1 and don't do optimization if -Os is set
- Stores MachineBasicBlock* instead of BBNum
- Uses DenseMap instead of std::map
- Fixes placement of braces
Patch by Andy Zhang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171879
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 8 Jan 2013 17:46:30 +0000 (17:46 +0000)]
Docs: mention that we support float reductions when -ffast-math is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171873
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 8 Jan 2013 17:41:59 +0000 (17:41 +0000)]
Rename statistic for instruction fragments -> relaxable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171872
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 8 Jan 2013 17:37:45 +0000 (17:37 +0000)]
Code cleanup: refactor the switch statements in the generation of reduction variables into an IR builder call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171871
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 8 Jan 2013 17:23:17 +0000 (17:23 +0000)]
Rename the enum members to match the LLVM coding style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171868
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 8 Jan 2013 17:09:59 +0000 (17:09 +0000)]
Add fp128 rtlib function names to LLVM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171867
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 8 Jan 2013 16:56:23 +0000 (16:56 +0000)]
Allow the asm printer to print fp128 values properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171866
91177308-0d34-0410-b5e6-
96231b3b80d8
Joel Jones [Tue, 8 Jan 2013 16:23:02 +0000 (16:23 +0000)]
Add highlighting for "int" keyword
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171863
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 8 Jan 2013 10:51:32 +0000 (10:51 +0000)]
Make sure we don't emit instructions before a landingpad instruction.
PR14782
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171846
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 8 Jan 2013 10:12:09 +0000 (10:12 +0000)]
Allow ELF64 relocation type to be more than 8 bits.
Current targets don't have more than 256 relocations so they don't hit this
limit, but ELF64 actually allows more than 8 bits for a relocation type. These
were being truncated on AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171845
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 8 Jan 2013 05:11:57 +0000 (05:11 +0000)]
Sink a function that refers to the SelectionDAG into that library in the
one file where it is called as a static function. Nuke the declaration
and the definition in lib/CodeGen, along with the include of
SelectionDAG.h from this file.
There is no dependency edge from lib/CodeGen to
lib/CodeGen/SelectionDAG, so it isn't valid for a routine in lib/CodeGen
to reference the DAG. There is a dependency from
lib/CodeGen/SelectionDAG on lib/CodeGen. This breaks one violation of
this layering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171842
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 8 Jan 2013 03:03:14 +0000 (03:03 +0000)]
Add the C testcase to this file.
Suggested by Dave Blaikie.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171839
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Tue, 8 Jan 2013 02:35:15 +0000 (02:35 +0000)]
Update README.txt to more accurately reflect reality.
This closes PR14709 and hopefully is a small step towards preventing
similar issues in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171837
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 8 Jan 2013 01:53:52 +0000 (01:53 +0000)]
Remove the llvm-local DW_TAG_vector_type tag and add a test to
make sure that vector types do work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171833
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 8 Jan 2013 01:53:42 +0000 (01:53 +0000)]
Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171832
91177308-0d34-0410-b5e6-
96231b3b80d8
Lenny Maiorani [Tue, 8 Jan 2013 01:08:52 +0000 (01:08 +0000)]
Split changeset_ty using iterators instead of loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171829
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 8 Jan 2013 00:31:02 +0000 (00:31 +0000)]
Mark artificial types as such in the annotated debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171826
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 8 Jan 2013 00:22:56 +0000 (00:22 +0000)]
Renamed MCInstFragment to MCRelaxableFragment and added some comments.
No change in functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171822
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 8 Jan 2013 00:16:33 +0000 (00:16 +0000)]
Remove what appears to be a dead llvm-specific debug tag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171821
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 7 Jan 2013 23:21:44 +0000 (23:21 +0000)]
Pack MachineOperand bitfields better.
Previously, 4 bits were unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171814
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 7 Jan 2013 23:21:41 +0000 (23:21 +0000)]
Pack MachineInstr fields better.
This shrinks MachineInstr to 64 bytes (from 72).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171813
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 7 Jan 2013 23:13:00 +0000 (23:13 +0000)]
LoopVectorizer: Add support for floating point reductions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171812
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Mon, 7 Jan 2013 23:12:59 +0000 (23:12 +0000)]
Add some additional tests for the .bundle_lock align_to_end feature that didn't
make into the last commit.
Also, update the test-generation script to generate an exhaustive test for
align_to_end as well, and include the generated test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171811
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 7 Jan 2013 23:04:00 +0000 (23:04 +0000)]
Remove dead directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171807
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Mon, 7 Jan 2013 22:41:28 +0000 (22:41 +0000)]
Cosmetical changne in order to conform to coding std.
Thank Eric Christopher for figuring out these problems!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171805
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 7 Jan 2013 22:40:48 +0000 (22:40 +0000)]
Whitespace and 80-col.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171804
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 7 Jan 2013 22:40:45 +0000 (22:40 +0000)]
Whitespace and 80-col.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171803
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 7 Jan 2013 21:54:51 +0000 (21:54 +0000)]
LoopVectorizer: When we vectorizer and widen loops we process many elements at once. This is a good thing, except for
small loops. On small loops post-loop that handles scalars (and runs slower) can take more time to execute than the
rest of the loop. This patch disables widening of loops with a small static trip count.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171798
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Mon, 7 Jan 2013 21:51:08 +0000 (21:51 +0000)]
Add the align_to_end option to .bundle_lock in the MC implementation of aligned
bundling. The document describing this feature and the implementation has also
been updated:
https://sites.google.com/a/chromium.org/dev/nativeclient/pnacl/aligned-bundling-support-in-llvm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171797
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Mon, 7 Jan 2013 21:39:23 +0000 (21:39 +0000)]
This change is to implement following rules:
o. X/C1 * C2 => X * (C2/C1) (if C2/C1 is neither special FP nor denormal)
o. X/C1 * C2 -> X/(C1/C2) (if C2/C1 is either specical FP or denormal, but C1/C2 is a normal Fp)
Let MDC denote multiplication or dividion with one & only one operand being a constant
o. (MDC ± C1) * C2 => (MDC * C2) ± (C1 * C2)
(so long as the constant-folding doesn't yield any denormal or special value)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171793
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Mon, 7 Jan 2013 21:26:07 +0000 (21:26 +0000)]
Fixed EOL whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171791
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 7 Jan 2013 21:24:35 +0000 (21:24 +0000)]
ARM: Copy-paste error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171790
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 7 Jan 2013 21:12:13 +0000 (21:12 +0000)]
ARM: Fix a few copy-paste errors.
s/X86/ARM/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171789
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 7 Jan 2013 20:34:12 +0000 (20:34 +0000)]
[ms-inline asm] Make sure the NullStreamParser doesn't try to emit labels when
parsing MS-style inline assembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171784
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 7 Jan 2013 19:32:45 +0000 (19:32 +0000)]
Add more comments to what's going on here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171780
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 7 Jan 2013 19:32:41 +0000 (19:32 +0000)]
Add support for separating strings for the split debug info DWARF5
proposal. This leaves the strings in the skeleton die as strp,
but in all dwo files they're accessed now via DW_FORM_GNU_str_index.
Add support for dumping these sections and modify the fission-cu.ll
testcase to have the correct strings and form. Fix a small bug
in the fixed form sizes routine that involved out of array accesses
for the table and add a FIXME in the extractFast routine to fix
this up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171779
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Mon, 7 Jan 2013 19:29:18 +0000 (19:29 +0000)]
This patch addresses bug 14678 by fixing two problems in medium code model
code generation. Variables addressed through a GlobalAlias were not being
handled, and variables with available_externally linkage were treated
incorrectly. The patch contains two new tests to verify the correct code
generation for these cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171778
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 7 Jan 2013 19:00:49 +0000 (19:00 +0000)]
Change SMRange to be half-open (exclusive end) instead of closed (inclusive)
This is necessary not only for representing empty ranges, but for handling
multibyte characters in the input. (If the end pointer in a range refers to
a multibyte character, should it point to the beginning or the end of the
character in a char array?) Some of the code in the asm parsers was already
assuming this anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171765
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Mon, 7 Jan 2013 18:59:35 +0000 (18:59 +0000)]
Implement APFloat::isDenormal()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171764
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Mon, 7 Jan 2013 18:37:41 +0000 (18:37 +0000)]
When code size is the priority (Oz, MinSize attribute), help llvm
turning a code like this:
if (foo)
free(foo)
into that:
free(foo)
Move a call to free from basic block FB into FB's predecessor, P,
when the path from P to FB is taken only if the argument of free is
not equal to NULL.
Some restrictions apply on P and FB to be sure that this code motion
is profitable. Namely:
1. FB must have only one predecessor P.
2. FB must contain only the call to free plus an unconditional
branch to S.
3. P's successors are FB and S.
Because of 1., we will not increase the code size when moving the call
to free from FB to P.
Because of 2., FB will be empty after the move.
Because of 2. and 3., P's branch instruction becomes useless, so as FB
(simplifycfg will do the job).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171762
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 7 Jan 2013 17:52:49 +0000 (17:52 +0000)]
Make test/DebugInfo/member-pointers.ll portable by removing the TargetData
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171759
91177308-0d34-0410-b5e6-
96231b3b80d8
Joel Jones [Mon, 7 Jan 2013 17:07:10 +0000 (17:07 +0000)]
Claim ".td" files. Improve README cp command. Drop "Bundle" from description
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171758
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 7 Jan 2013 15:43:51 +0000 (15:43 +0000)]
Move TypeFinder.h into the IR tree, it clearly belongs with the IR library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171749
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 7 Jan 2013 15:35:46 +0000 (15:35 +0000)]
Rename the VMCore unittest tree to IR. Somehow was missed when doing the
library rename.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171747
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 7 Jan 2013 15:26:48 +0000 (15:26 +0000)]
Move CallGraphSCCPass.h into the Analysis tree; that's where the
implementation lives already.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171746
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 7 Jan 2013 15:16:50 +0000 (15:16 +0000)]
Remove the long defunct 'DefaultPasses' header. We have a pass manager
builder these days, and this thing hasn't seen updates for a very long
time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171741
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 7 Jan 2013 15:14:13 +0000 (15:14 +0000)]
Sink AddrMode back into TargetLowering, removing one of the most
peculiar headers under include/llvm.
This struct still doesn't make a lot of sense, but it makes more sense
down in TargetLowering than it did before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171739
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 7 Jan 2013 15:04:40 +0000 (15:04 +0000)]
Remove LSR's use of the random AddrMode struct. These variables were
already in a class, just inline the four of them. I suspect that this
class could be simplified some to not always keep distinct variables for
these things, but it wasn't clear to me how given the usage so I opted
for a trivial and mechanical translation.
This removes one of the two remaining users of a header in include/llvm
which does nothing more than define a 4 member struct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171738
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 7 Jan 2013 14:41:08 +0000 (14:41 +0000)]
Switch the SCEV expander and LoopStrengthReduce to use
TargetTransformInfo rather than TargetLowering, removing one of the
primary instances of the layering violation of Transforms depending
directly on Target.
This is a really big deal because LSR used to be a "special" pass that
could only be tested fully using llc and by looking at the full output
of it. It also couldn't run with any other loop passes because it had to
be created by the backend. No longer is this true. LSR is now just
a normal pass and we should probably lift the creation of LSR out of
lib/CodeGen/Passes.cpp and into the PassManagerBuilder. =] I've not done
this, or updated all of the tests to use opt and a triple, because
I suspect someone more familiar with LSR would do a better job. This
change should be essentially without functional impact for normal
compilations, and only change behvaior of targetless compilations.
The conversion required changing all of the LSR code to refer to the TTI
interfaces, which fortunately are very similar to TargetLowering's
interfaces. However, it also allowed us to *always* expect to have some
implementation around. I've pushed that simplification through the pass,
and leveraged it to simplify code somewhat. It required some test
updates for one of two things: either we used to skip some checks
altogether but now we get the default "no" answer for them, or we used
to have no information about the target and now we do have some.
I've also started the process of removing AddrMode, as the TTI interface
doesn't use it any longer. In some cases this simplifies code, and in
others it adds some complexity, but I think it's not a bad tradeoff even
there. Subsequent patches will try to clean this up even further and use
other (more appropriate) abstractions.
Yet again, almost all of the formatting changes brought to you by
clang-format. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171735
91177308-0d34-0410-b5e6-
96231b3b80d8
David Tweed [Mon, 7 Jan 2013 13:41:55 +0000 (13:41 +0000)]
Fix a mistaken commit that included some debugging code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171734
91177308-0d34-0410-b5e6-
96231b3b80d8
David Tweed [Mon, 7 Jan 2013 13:32:38 +0000 (13:32 +0000)]
There was a switch fall-through in the parser for textual LLVM that caused
bogus comparison operands to default to eq/oeq. Fix that, fix a couple of
tests that accidentally passed and test for bogus comparison opeartors
explicitly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171733
91177308-0d34-0410-b5e6-
96231b3b80d8
Silviu Baranga [Mon, 7 Jan 2013 12:31:25 +0000 (12:31 +0000)]
Make the MergeGlobals pass correctly handle the address space qualifiers of the global variables. We partition the set of globals by their address space, and apply the same the trasnformation as before to merge them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171730
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Mon, 7 Jan 2013 12:17:44 +0000 (12:17 +0000)]
Documentation: add a note that Clang on Mageia 2 can not find libstdc++ headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171729
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 7 Jan 2013 11:14:44 +0000 (11:14 +0000)]
R600/SIISelLowering.cpp: Suppress a warning. [-Wunused-variable]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171728
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 7 Jan 2013 11:13:51 +0000 (11:13 +0000)]
CallingConvLower.h: Use bitfields like unsigned:1 instead of bool:1 .
Some compilers might be confused if bool were potentially signed integer. In my case, g++-4.7.0 miscompiled CodeGen/ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171727
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 7 Jan 2013 11:12:29 +0000 (11:12 +0000)]
Simplify LoopVectorize to require target transform info and rely on it
being present. Make a member of one of the helper classes a reference as
part of this.
Reformatting goodness brought to you by clang-format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171726
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 7 Jan 2013 10:44:06 +0000 (10:44 +0000)]
Merge the unused header file for LoopVectorizer into the source file.
This makes the loop vectorizer match the pattern followed by roughly all
other passses. =]
Notably, this header file was braken in several regards: it contained
a using namespace directive, global #define's that aren't globaly
appropriate, and global constants defined directly in the header file.
As a side benefit, lots of the types in this file become internal, which
will cause the optimizer to chew on this pass more effectively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171723
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 7 Jan 2013 10:22:36 +0000 (10:22 +0000)]
Switch BBVectorize to directly depend on having a TTI analysis.
This could be simplified further, but Hal has a specific feature for
ignoring TTI, and so I preserved that.
Also, I needed to use it because a number of tests fail when switching
from a null TTI to the NoTTI nonce implementation. That seems suspicious
to me and so may be something that you need to look into Hal. I worked
it by preserving the old behavior for these tests with the flag that
ignores all target info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171722
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 7 Jan 2013 10:04:49 +0000 (10:04 +0000)]
Add LICENSE.TXT covering contributions made by ARM.
Absent a Contributor's License Agreement (CLA) with an LLVM legal entity and as
reviewed and agreed with Chris Lattner, add a patent license covering future
contributions from ARM until there is a CLA. This is to make explicit ARM's
grant of patent rights to recipients of LLVM containing ARM-contributed
material.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171721
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 7 Jan 2013 09:57:00 +0000 (09:57 +0000)]
Fix a slew of indentation and parameter naming style issues. This 80% of
this patch brought to you by the tool clang-format.
I wanted to fix up the names of constructor parameters because they
followed a bit of an anti-pattern by naming initialisms with CamelCase:
'Tti', 'Se', etc. This appears to have been in an attempt to not overlap
with the names of member variables 'TTI', 'SE', etc. However,
constructor arguments can very safely alias members, and in fact that's
the conventional way to pass in members. I've fixed all of these I saw,
along with making some strang abbreviations such as 'Lp' be simpler 'L',
or 'Lgl' be the word 'Legal'.
However, the code I was touching had indentation and formatting somewhat
all over the map. So I ran clang-format and fixed them.
I also fixed a few other formatting or doxygen formatting issues such as
using ///< on trailing comments so they are associated with the correct
entry.
There is still a lot of room for improvement of the formating and
cleanliness of this code. ;] At least a few parts of the coding
standards or common practices in LLVM's code aren't followed, the enum
naming rules jumped out at me. I may mix some of these while I'm here,
but not all of them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171719
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 7 Jan 2013 09:17:41 +0000 (09:17 +0000)]
Switch LoopIdiom pass to directly require target transform information.
I'm sorry for duplicating bad style here, but I wanted to keep
consistency. I've pinged the code review thread where this style was
reviewed and changes were requested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171714
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 7 Jan 2013 08:24:35 +0000 (08:24 +0000)]
Rough out a new c'tor for the AttrBuilder class.
This c'tor takes the AttributeSet class as the parameter. It will eventually
grab the attributes from the specified index and create a new attribute builder
with those attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171712
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 7 Jan 2013 06:14:20 +0000 (06:14 +0000)]
Remove more unnecessary # operators with nothing to paste proceeding them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171702
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 7 Jan 2013 06:02:07 +0000 (06:02 +0000)]
Documentation updates for pointer-to-member debug info added in r171698.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171701
91177308-0d34-0410-b5e6-
96231b3b80d8