Richard Barton [Mon, 9 Jul 2012 16:41:33 +0000 (16:41 +0000)]
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
Richard Barton [Mon, 9 Jul 2012 16:31:14 +0000 (16:31 +0000)]
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
Richard Barton [Mon, 9 Jul 2012 16:14:28 +0000 (16:14 +0000)]
Spelling!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159936
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Barton [Mon, 9 Jul 2012 16:12:24 +0000 (16:12 +0000)]
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
Benjamin Kramer [Sun, 8 Jul 2012 19:47:51 +0000 (19:47 +0000)]
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
Benjamin Kramer [Sun, 8 Jul 2012 12:06:35 +0000 (12:06 +0000)]
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
Andrew Trick [Sat, 7 Jul 2012 04:00:00 +0000 (04:00 +0000)]
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
Andrew Trick [Sat, 7 Jul 2012 03:59:51 +0000 (03:59 +0000)]
whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159890
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 7 Jul 2012 03:59:48 +0000 (03:59 +0000)]
Tweak spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159889
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Sat, 7 Jul 2012 03:34:46 +0000 (03:34 +0000)]
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
NAKAMURA Takumi [Sat, 7 Jul 2012 03:12:28 +0000 (03:12 +0000)]
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
Bill Wendling [Sat, 7 Jul 2012 00:52:35 +0000 (00:52 +0000)]
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
Bill Wendling [Fri, 6 Jul 2012 23:43:12 +0000 (23:43 +0000)]
Print the name last.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159879
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 6 Jul 2012 23:13:38 +0000 (23:13 +0000)]
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
Nuno Lopes [Fri, 6 Jul 2012 23:09:25 +0000 (23:09 +0000)]
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
Dmitri Gribenko [Fri, 6 Jul 2012 23:06:47 +0000 (23:06 +0000)]
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
Bill Wendling [Fri, 6 Jul 2012 23:06:16 +0000 (23:06 +0000)]
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
Jim Grosbach [Fri, 6 Jul 2012 21:52:04 +0000 (21:52 +0000)]
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
Akira Hatanaka [Fri, 6 Jul 2012 20:16:48 +0000 (20:16 +0000)]
revert r159851.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159854
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 6 Jul 2012 19:29:11 +0000 (19:29 +0000)]
Reapply r158846.
Include file MipsGenRegisterInfo.inc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159851
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 6 Jul 2012 19:12:31 +0000 (19:12 +0000)]
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
Bill Wendling [Fri, 6 Jul 2012 17:49:19 +0000 (17:49 +0000)]
Remove trailing comma in array initialization list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159843
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 6 Jul 2012 17:47:36 +0000 (17:47 +0000)]
Remove unnecessary 'llvm::'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159842
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 6 Jul 2012 17:46:28 +0000 (17:46 +0000)]
Remove unnecessary 'llvm::'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159841
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 6 Jul 2012 17:44:22 +0000 (17:44 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159839
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 6 Jul 2012 17:36:20 +0000 (17:36 +0000)]
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
Chad Rosier [Fri, 6 Jul 2012 17:33:39 +0000 (17:33 +0000)]
[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
Chad Rosier [Fri, 6 Jul 2012 17:15:03 +0000 (17:15 +0000)]
Update getFunction parameter documentation. Fixes PR13268.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159835
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Fri, 6 Jul 2012 16:42:25 +0000 (16:42 +0000)]
Revert r159789.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159834
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 6 Jul 2012 15:55:39 +0000 (15:55 +0000)]
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
Duncan Sands [Fri, 6 Jul 2012 14:43:16 +0000 (14:43 +0000)]
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
NAKAMURA Takumi [Fri, 6 Jul 2012 12:12:39 +0000 (12:12 +0000)]
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
NAKAMURA Takumi [Fri, 6 Jul 2012 11:12:44 +0000 (11:12 +0000)]
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
Alexey Samsonov [Fri, 6 Jul 2012 08:45:08 +0000 (08:45 +0000)]
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
Bill Wendling [Fri, 6 Jul 2012 05:51:50 +0000 (05:51 +0000)]
Sphinxify the CMake document.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159806
91177308-0d34-0410-b5e6-
96231b3b80d8
Jush Lu [Fri, 6 Jul 2012 03:02:37 +0000 (03:02 +0000)]
[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
Jack Carter [Fri, 6 Jul 2012 02:44:22 +0000 (02:44 +0000)]
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
Eric Christopher [Fri, 6 Jul 2012 02:35:57 +0000 (02:35 +0000)]
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
Jakob Stoklund Olesen [Fri, 6 Jul 2012 02:31:22 +0000 (02:31 +0000)]
Add some comments suggested in code review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159800
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Fri, 6 Jul 2012 00:25:39 +0000 (00:25 +0000)]
Enable new[] on llvm::BumpPtrAllocator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159789
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Thu, 5 Jul 2012 23:58:21 +0000 (23:58 +0000)]
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
Owen Anderson [Thu, 5 Jul 2012 22:30:42 +0000 (22:30 +0000)]
Fix an overzealous assertion. It is legitimate for a target to have multiple fixups on a single instruction that target the same byte, so long as their bit-offsets are coordinates appropriately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159785
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 5 Jul 2012 19:29:31 +0000 (19:29 +0000)]
test case for r159770.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159771
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 5 Jul 2012 19:26:38 +0000 (19:26 +0000)]
Enclose instruction rdhwr with directives, which are needed when target is
mips32 rev1 (the directives are emitted when target is mips32r2 too).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159770
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 5 Jul 2012 19:09:33 +0000 (19:09 +0000)]
Enable target dependent directive parsing to hook before standard parser in
AsmParser::ParseStatement.
Patch by Vladimir Medic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159768
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 5 Jul 2012 17:37:07 +0000 (17:37 +0000)]
add @llvm.donothing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159758
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 5 Jul 2012 12:40:45 +0000 (12:40 +0000)]
Optimize extendIntervalEndTo a tiny bit by saving one call through the
vector erase. No functionality changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159746
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 5 Jul 2012 11:40:23 +0000 (11:40 +0000)]
Remove dead infrastructure for building DenseMaps with a SlotIndex as
the key -- they are now stored in an IntervalMap.
I noticed this while looking into PR12652.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159745
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 5 Jul 2012 11:06:22 +0000 (11:06 +0000)]
Finish fixing the MachineOperand hashing, providing a nice modern
hash_value overload for MachineOperands. This addresses a FIXME
sufficient for me to remove it, and cleans up the code nicely too.
The important changes to the hashing logic:
- TargetFlags are now included in all of the hashes. These were complete
missed.
- Register operands have their subregisters and whether they are a def
included in the hash.
- We now actually hash all of the operand types. Previously, many
operand types were simply *dropped on the floor*. For example:
- Floating point immediates
- Large integer immediates (>64-bit)
- External globals!
- Register masks
- Metadata operands
- It removes the offset from the block-address hash; I'm a bit
suspicious of this, but isIdenticalTo doesn't consider the offset for
black addresses.
Any patterns involving these entities could have triggered extreme
slowdowns in MachineCSE or PHIElimination. Let me know if there are PRs
you think might be closed now... I'm looking myself, but I may miss
them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159743
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 5 Jul 2012 10:14:33 +0000 (10:14 +0000)]
All cases are covered, no need for a default. This deals with the
corresponding clang warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159742
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 5 Jul 2012 10:03:57 +0000 (10:03 +0000)]
The hash function for MI expressions, used by MachineCSE, is really
broken. This patch fixes the superficial problems which lead to the
intractably slow compile times reported in PR13225.
The specific issue is that we were failing to include the *offset* of
a global variable in the hash code. Oops. This would in turn cause all
MIs which were only distinguishable due to operating on different
offsets of a global variable to produce identical hash functions. In
some of the test cases attached to the PR I saw hash table activity
where there were O(1000) probes-per-lookup *on average*. A very few
entries were responsible for most of these probes.
There is still quite a bit more to do here. The ad-hoc layering of data
in MachineOperands makes them *extremely* brittle to hash correctly.
We're missing quite a few other cases, the only ones I've fixed here are
the specific MO types which were allowed through the assert() in
getOffset().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159741
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 5 Jul 2012 09:32:46 +0000 (09:32 +0000)]
Use the right kind of booleans: we were emitting 0/1 booleans, instead of 0/-1
booleans. Patch by James Benton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159739
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 5 Jul 2012 09:07:31 +0000 (09:07 +0000)]
[tsan] fix compile-time falilure found while building Chromium with tsan (tsan issue #3). A unit test will follow separately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159736
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 5 Jul 2012 06:19:21 +0000 (06:19 +0000)]
Remove ParentMap. You can just ask the domnode for its parent. No functionality
change.
Move the "Not profitable, avoid CSE!" debug message next to where we fail the
check for profitability and use a different message for avoiding CSE due to
being in different register classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159729
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 4 Jul 2012 23:53:27 +0000 (23:53 +0000)]
Make X86 call and return instructions non-variadic.
Function argument and return value registers aren't part of the
encoding, so they should be implicit operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159728
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 4 Jul 2012 23:53:23 +0000 (23:53 +0000)]
Allow trailing physreg RegisterSDNode operands on non-variadic instructions.
Also allow trailing register mask operands on non-variadic both
MachineSDNodes and MachineInstrs.
The extra physreg RegisterSDNode operands are added to the MI as
<imp-use> operands. This makes it possible to have non-variadic call
instructions.
Call and return instructions really are non-variadic, the argument
registers should only be used implicitly - they are not part of the
encoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159727
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 4 Jul 2012 23:53:19 +0000 (23:53 +0000)]
Print SlotIndexes when available for -print-machineinstrs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159726
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 4 Jul 2012 19:52:05 +0000 (19:52 +0000)]
Allow multiple terminators to read virtual registers.
Find the kill as the last terminator to read SrcReg.
Patch by Philipp Brüschweiler!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159722
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 4 Jul 2012 19:28:31 +0000 (19:28 +0000)]
Ensure CopyToReg nodes are always glued to the call instruction.
The CopyToReg nodes that set up the argument registers before a call
must be glued to the call instruction. Otherwise, the scheduler may emit
the physreg copies long before the call, causing long live ranges for
the fixed registers.
Besides disabling good register allocation, that can also expose
problems when EmitInstrWithCustomInserter() splits a basic block during
the live range of a physreg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159721
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 4 Jul 2012 19:28:27 +0000 (19:28 +0000)]
Make sure -print-machineinstrs applies to the first pass as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159720
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 4 Jul 2012 16:06:00 +0000 (16:06 +0000)]
Add a testcase for pr13209. It is not a great test, but it still fails if
159509 and 159479 are reverted. It would be really nice to be able to run
just the coalescer :-(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159715
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 4 Jul 2012 09:42:54 +0000 (09:42 +0000)]
Fix a bug in DebugInfo lib, extend a comment for one of the methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159707
91177308-0d34-0410-b5e6-
96231b3b80d8
Stepan Dyatkovskiy [Wed, 4 Jul 2012 06:07:06 +0000 (06:07 +0000)]
Reverted r159658:
Optimized diff operation: implemented the case when LHS and RHS subsets contains single numbers only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159704
91177308-0d34-0410-b5e6-
96231b3b80d8
Stepan Dyatkovskiy [Wed, 4 Jul 2012 05:53:05 +0000 (05:53 +0000)]
Reverted r156659, due to probable performance regressions, DenseMap should be used here:
IntegersSubsetMapping
- Replaced type of Items field from std::list with std::map. In neares future I'll test it with DenseMap and do the correspond replacement
if possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159703
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 4 Jul 2012 02:02:18 +0000 (02:02 +0000)]
Reduce some code duplication.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159701
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Wed, 4 Jul 2012 01:09:45 +0000 (01:09 +0000)]
Fix some ascii art in a comment to not have trailing backslashes (inspiration
from IfConversion.cc), and fix some spelling and grammar in the surrounding
prose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159699
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 4 Jul 2012 00:09:58 +0000 (00:09 +0000)]
Add early if-conversion support to X86.
Implement the TII hooks needed by EarlyIfConversion to create cmov
instructions and estimate their latency.
Early if-conversion is still not enabled by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159695
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 4 Jul 2012 00:09:54 +0000 (00:09 +0000)]
Add an experimental early if-conversion pass, off by default.
This pass performs if-conversion on SSA form machine code by
speculatively executing both sides of the branch and using a cmov
instruction to select the result. This can help lower the number of
branch mispredictions on architectures like x86 that don't have
predicable instructions.
The current implementation is very aggressive, and causes regressions on
mosts tests. It needs good heuristics that have yet to be implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159694
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Tue, 3 Jul 2012 21:15:40 +0000 (21:15 +0000)]
PHINode::hasConstantValue(): return undef if the PHI is fully recursive.
Thanks Duncan for the idea
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159687
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 3 Jul 2012 20:01:02 +0000 (20:01 +0000)]
Use the DebugInfo's 'print()' method to emit the comments.
These give quite a bit more information about the DebugInfo and makes it more
readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159680
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Tue, 3 Jul 2012 17:30:18 +0000 (17:30 +0000)]
BoundsChecking: optimize out the check for offset < 0 if size is known to be >= 0 (signed).
(LLVM optimizers cannot do this optimization by themselves)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159668
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Tue, 3 Jul 2012 17:13:25 +0000 (17:13 +0000)]
fold PHI nodes in SizeOffsetEvaluator whenever possible.
Unfortunately this change requires the cache map to hold WeakVHs instead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159667
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Tue, 3 Jul 2012 17:10:28 +0000 (17:10 +0000)]
improve PHINode::hasConstantValue() to detect recursive cases like %phi = phi(%phi,42) as constant
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159666
91177308-0d34-0410-b5e6-
96231b3b80d8
Stepan Dyatkovskiy [Tue, 3 Jul 2012 14:29:26 +0000 (14:29 +0000)]
IntegersSubsetMappin: cosmetic changes in diff operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159661
91177308-0d34-0410-b5e6-
96231b3b80d8
Stepan Dyatkovskiy [Tue, 3 Jul 2012 14:15:36 +0000 (14:15 +0000)]
Part of r159527. Splitted into series of patches and gone with fixed PR13256:
IntegersSubsetMapping
Added new methods
- add(self& RHS, SuccessorClass *S)
- detachCase
- removeCase
- findSuccessor
- getCases
- getCaseSingleNumber
- isOverlapped
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159660
91177308-0d34-0410-b5e6-
96231b3b80d8
Stepan Dyatkovskiy [Tue, 3 Jul 2012 13:46:45 +0000 (13:46 +0000)]
Part of r159527. Splitted into series of patches and gone with fixed PR13256:
IntegersSubsetMapping
- Replaced type of Items field from std::list with std::map. In neares future I'll test it with DenseMap and do the correspond replacement
if possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159659
91177308-0d34-0410-b5e6-
96231b3b80d8
Stepan Dyatkovskiy [Tue, 3 Jul 2012 13:29:14 +0000 (13:29 +0000)]
Part of r159527. Splitted into series of patches and gone with fixed PR13256:
Optimized diff operation: implemented the case when LHS and RHS subsets contains single numbers only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159658
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 3 Jul 2012 12:25:40 +0000 (12:25 +0000)]
Document the llvm.fabs intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159657
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 3 Jul 2012 07:16:13 +0000 (07:16 +0000)]
Micro-optimize this function a bit. This shrinks the generated code
some, and allows the routine to be inlined into common callers. The
various bits that hit this code in their hotpath seem slightly lower on
the profile, but I can't really measure a performance improvement as
everything seems to still be bottlenecked on likely cache misses. =/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159648
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 3 Jul 2012 06:48:58 +0000 (06:48 +0000)]
Remove extra space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159647
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 3 Jul 2012 06:11:06 +0000 (06:11 +0000)]
Change i128mem/i256mem to f128mem/f256mem on some floating point vector instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159646
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 3 Jul 2012 06:01:27 +0000 (06:01 +0000)]
MCContext.cpp: Fixup for my odd previous commit. No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159645
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 3 Jul 2012 05:49:45 +0000 (05:49 +0000)]
Add aliases for pblendvb, blendvpd, and blendvps instructions with the implicit xmm0 operand specified. Fixes PR13252.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159644
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 3 Jul 2012 04:29:20 +0000 (04:29 +0000)]
test/CodeGen/SPARC/private.ll: Fixup. Forgot to prune old RUN lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159643
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 3 Jul 2012 04:21:57 +0000 (04:21 +0000)]
test/CodeGen/SPARC/private.ll: FileCheck-ize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159642
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 3 Jul 2012 03:59:34 +0000 (03:59 +0000)]
llvm/test/lit.cfg: Retweak for Win32 to fix testing.
- execute_external should be;
- Not on Win32.
- Using bash.
In reverse, "execute_internal" shoud be (Win32 && !bash).
- lit.getBashPath() behaves differently before and after tweaking $PATH.
I will add a few explanations there later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159641
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 3 Jul 2012 03:59:29 +0000 (03:59 +0000)]
MCContext::GetDwarfFile(): Make FileName parsing tolerant of DOSish pathsep with PathV2.
It fixes failure in test/MC/MachO/gen-dwarf.s on Win32 w/o bash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159640
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 3 Jul 2012 03:59:22 +0000 (03:59 +0000)]
test/CodeGen/X86/sincos.ll: FileCheck-ize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159639
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 3 Jul 2012 03:59:15 +0000 (03:59 +0000)]
test/CodeGen/X86/fabs.ll: FileCheck-ize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159638
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 3 Jul 2012 03:59:08 +0000 (03:59 +0000)]
test/CodeGen/X86/2007-09-05-InvalidAsm.ll: FileCheck-ize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159637
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 3 Jul 2012 03:58:59 +0000 (03:58 +0000)]
test/CodeGen/X86/2004-03-30-Select-Max.ll: FileCheck-ize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159636
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Mon, 2 Jul 2012 23:35:23 +0000 (23:35 +0000)]
mips32 long long register inline asm constraint support.
inlineasm-cnstrnt-bad-r-1.ll is NOT supposed to fail, so it was removed. This resulted in the removal of a negative test (inlineasm-cnstrnt-bad-r-1.ll)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159625
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 2 Jul 2012 23:22:25 +0000 (23:22 +0000)]
Revert " mips32 long long register inline asm constraint support." as
it appears to be breaking the bots.
This reverts commit
1b055ce320fa13f6f1ac81670d11b45e01f79876.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159619
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 2 Jul 2012 23:22:21 +0000 (23:22 +0000)]
Revert "IntRange:" as it appears to be breaking self hosting.
This reverts commit
b2833d9dcba88c6f0520cad760619200adc0442c.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159618
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Mon, 2 Jul 2012 23:21:22 +0000 (23:21 +0000)]
deleted test/CodeGen/Mips/inlineasm-cnstrnt-bad-r-1.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159617
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 2 Jul 2012 22:56:41 +0000 (22:56 +0000)]
All glory to address sanitizer. ;]
It appears to have caught a use-after-free introduced as by r159567
and/or friends which call 'addPass' from many more places. The bug in
'addPass' doesn't appear to be new, and was spotted by inspection when
ASan shown a bright light of a stacktrace at these functions.
Hopefully this will fix the ASan failure -- I have no test case other
than running an ASan-built clang over the test suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159614
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 2 Jul 2012 22:39:56 +0000 (22:39 +0000)]
Target option DisableJumpTables is a gross hack. Move it to TargetLowering instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159611
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Mon, 2 Jul 2012 22:39:45 +0000 (22:39 +0000)]
mips32 long long register inline asm constraint support.
inlineasm-cnstrnt-bad-r-1.ll is NOT supposed to fail, so it was removed. This resulted in the removal of a negative test (inlineasm-cnstrnt-bad-r-1.ll)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159610
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 2 Jul 2012 21:55:12 +0000 (21:55 +0000)]
misched: allow NULL InstrItineraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159599
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 2 Jul 2012 21:45:22 +0000 (21:45 +0000)]
Extend the workaround from r159593 to cover a few explicit alias
targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159597
91177308-0d34-0410-b5e6-
96231b3b80d8