Commit Graph

83752 Commits

Author SHA1 Message Date
Chad Rosier
270e3625b2 Revert r159938 (and r159945) to appease the buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159960 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-09 20:43:34 +00:00
Andrew Trick
cb94192ff0 Machine model: allow itineraries to be shared by different processor models.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159959 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-09 20:43:03 +00:00
Andrew Trick
70cb1778b9 indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159958 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-09 20:43:01 +00:00
Owen Anderson
d9bf71fdd2 Teach the DAG combiner to turn sitofp/uitofp from i1 into a conditional move, since there are only two possible values.
Previously, this would become an integer extension operation, followed by a real integer->float conversion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159957 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-09 20:31:12 +00:00
Manman Ren
6209364834 X86: implement functions to analyze & synthesize CMOV|SET|Jcc
getCondFromSETOpc, getCondFromCMovOpc, getSETFromCond, getCMovFromCond

No functional change intended.
If we want to update the condition code of CMOV|SET|Jcc, we first analyze the
opcode to get the condition code, then update the condition code, finally
synthesize the new opcode form the new condition code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159955 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-09 18:57:12 +00:00
Akira Hatanaka
241b77fa45 Reapply r158846.
Access mips register classes via MCRegisterInfo's functions instead of via the
TargetRegisterClasses defined in MipsGenRegisterInfo.inc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159953 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-09 18:46:47 +00:00
Nuno Lopes
78f8ef4217 instcombine: merge the functions that remove dead allocas and dead mallocs/callocs/...
This patch removes ~70 lines in InstCombineLoadStoreAlloca.cpp and makes both functions a bit more aggressive than before :)
In theory, we can be more aggressive when removing an alloca than a malloc, because an alloca pointer should never escape, but we are not taking advantage of this anyway

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159952 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-09 18:38:20 +00:00
Richard Barton
874b863f2a Some formatting to keep Clang happy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159948 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-09 18:30:56 +00:00
Richard Barton
83cfff6229 Oops - correct broken disassembly for VMOV
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159945 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-09 18:20:02 +00:00
Richard Barton
2e7e34ba54 Fix instruction description of VMOV (between two ARM core registers and two single-precision resiters)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159938 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-09 16:41:33 +00:00
Richard Barton
8ed97ef5f6 Prevent ARM assembler from losing a right shift by #32 applied to a register
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159937 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-09 16:31:14 +00:00
Richard Barton
c985e6ece6 Spelling!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159936 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-09 16:14:28 +00:00
Richard Barton
2b6652fb10 Teach the assembler to use the narrow thumb encodings of various three-register dp instructions where permissable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159935 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-09 16:12:24 +00:00
Benjamin Kramer
367783223d Remove some trivial copy ctors so the classes become trivially copyable and get the optimized SmallVector implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159916 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-08 19:47:51 +00:00
Benjamin Kramer
d9cff9a25a SmallVector: Make use of move semantics to speed up moving objects in erase() and insert()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159914 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-08 12:06:35 +00:00
Andrew Trick
2661b411cc I'm introducing a new machine model to simultaneously allow simple
subtarget CPU descriptions and support new features of
MachineScheduler.

MachineModel has three categories of data:
1) Basic properties for coarse grained instruction cost model.
2) Scheduler Read/Write resources for simple per-opcode and operand cost model (TBD).
3) Instruction itineraties for detailed per-cycle reservation tables.

These will all live side-by-side. Any subtarget can use any
combination of them. Instruction itineraries will not change in the
near term. In the long run, I expect them to only be relevant for
in-order VLIW machines that have complex contraints and require a
precise scheduling/bundling model. Once itineraries are only actively
used by VLIW-ish targets, they could be replaced by something more
appropriate for those targets.

This tablegen backend rewrite sets things up for introducing
MachineModel type #2: per opcode/operand cost model.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159891 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-07 04:00:00 +00:00
Andrew Trick
06495cd7f2 whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159890 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-07 03:59:51 +00:00
Andrew Trick
a11a6287a5 Tweak spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159889 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-07 03:59:48 +00:00
Manman Ren
2d4215f759 X86: Fix optimizeCompare to correctly check safe condition.
It is safe if EFLAGS is killed or re-defined.
When we are done with the basic block, check whether EFLAGS is live-out.
Do not optimize away cmp if EFLAGS is live-out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159888 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-07 03:34:46 +00:00
NAKAMURA Takumi
845b4c2f0b LLVMConfig.cmake.in: Quote around @LLVM_INSTALL_PREFIX@, or it would not accept whitespace paths.
Thanks to Kai.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159887 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-07 03:12:28 +00:00
Bill Wendling
9cb22d6c8c Use the DebugInfo wrappers instead of mucking about with the MDNode directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159881 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-07 00:52:35 +00:00
Bill Wendling
ee17cee77c Print the name last.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159879 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 23:43:12 +00:00
Chad Rosier
70cfaa3464 Fix the naming of ensureAlignment. Per the coding standard function names
should be camel case, and start with a lower case letter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159877 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 23:13:38 +00:00
Nuno Lopes
9969458b16 teach instcombine to remove allocated buffers even if there are stores, memcpy/memmove/memset, and objectsize users.
This means we can do cheap DSE for heap memory.
Nothing is done if the pointer excapes or has a load.

The churn in the tests is mostly due to objectsize, since we want to make sure we
don't delete the malloc call before evaluating the objectsize (otherwise it becomes -1/0)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159876 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 23:09:25 +00:00
Dmitri Gribenko
eb54603ddd Since SmallMap was removed in r158644, remove documentation in ProgrammersManual.html.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159874 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 23:06:47 +00:00
Bill Wendling
625252f427 Check if it's a scope last, because several things are scopes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159873 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 23:06:16 +00:00
Jim Grosbach
db6faeb19d ARM: Add test cleanup entry to the README.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159864 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 21:52:04 +00:00
Akira Hatanaka
63d10fbc89 revert r159851.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159854 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 20:16:48 +00:00
Akira Hatanaka
e32cc0d545 Reapply r158846.
Include file MipsGenRegisterInfo.inc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159851 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 19:29:11 +00:00
Bill Wendling
2da1a1621f Add a print method to the ObjC property object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159848 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 19:12:31 +00:00
Bill Wendling
9fdb7c0853 Remove trailing comma in array initialization list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159843 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 17:49:19 +00:00
Bill Wendling
f46b497b7f Remove unnecessary 'llvm::'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159842 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 17:47:36 +00:00
Bill Wendling
0735e81b3a Remove unnecessary 'llvm::'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159841 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 17:46:28 +00:00
Chad Rosier
6016a4a162 Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159839 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 17:44:22 +00:00
Manman Ren
2af66dc51a X86: peephole optimization to remove cmp instruction
For each Cmp, we check whether there is an earlier Sub which make Cmp
redundant. We handle the case where SUB operates on the same source operands as
Cmp, including the case where the two source operands are swapped.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159838 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 17:36:20 +00:00
Chad Rosier
fd065bbed1 [fast-isel] Tell fast-isel to do nothing with the new donothing intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159837 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 17:33:39 +00:00
Chad Rosier
c5171d5de6 Update getFunction parameter documentation. Fixes PR13268.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159835 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 17:15:03 +00:00
Dmitri Gribenko
d8a627b33b Revert r159789.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159834 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 16:42:25 +00:00
NAKAMURA Takumi
a75ae7e8ae llvm/include/llvm/CMakeLists.txt: Cut dependency to intrinsics_gen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159831 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 15:55:39 +00:00
Duncan Sands
4c3916f840 Attempt to fix windows buildbots. Patch by James Benton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159826 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 14:43:16 +00:00
NAKAMURA Takumi
365f1b84d3 test/CodeGen/X86/sext-setcc-self.ll: Mark it as XFAIL: cygwin,mingw32,win32. Investigating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159820 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 12:12:39 +00:00
NAKAMURA Takumi
bd985efa99 Revert r159804, "[arm-fast-isel] Add support for vararg function calls."
It broke LLVM :: CodeGen/Thumb2/large-call.ll on several hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159817 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 11:12:44 +00:00
Alexey Samsonov
b67bd33e8e Fix PR13202 and a regtest.
DwarfDebug class could generate the same (inlined) DIVariable twice:
1) when trying to find abstract debug variable for a concrete inlined instance.
2) when explicitly collecting info for variables that were optimized out.

This change makes sure that this duplication won't happen and makes
Clang pass "gdb.opt/inline-locals" test from gdb testsuite.

Reviewed by Eric Christopher.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159811 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 08:45:08 +00:00
Bill Wendling
d9aa95d534 Sphinxify the CMake document.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159806 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 05:51:50 +00:00
Jush Lu
a8c4d739f2 [arm-fast-isel] Add support for vararg function calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159804 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 03:02:37 +00:00
Jack Carter
020f07f571 Changes per review of commit 159787
Mips specific inline asm operand modifier D.
   
   Comment changes and predicate change.
   
   


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159802 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 02:44:22 +00:00
Eric Christopher
87c06a843c Untabify and move a function near similar functions dealing with struct
types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159801 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 02:35:57 +00:00
Jakob Stoklund Olesen
86fc3100b5 Add some comments suggested in code review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159800 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 02:31:22 +00:00
Dmitri Gribenko
0da21789b3 Enable new[] on llvm::BumpPtrAllocator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159789 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 00:25:39 +00:00
Jack Carter
244a84ee57 Mips specific inline asm operand modifier D.
Print the second half of a double word operand.
   
   The include list was cleaned up a bit as well.
   
   Also the test case was modified to test for both
   big and little patterns.
   


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159787 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-05 23:58:21 +00:00