Craig Topper [Fri, 14 Oct 2011 03:21:46 +0000 (03:21 +0000)]
Add X86 TZCNT instruction and patterns to select it. Also added core-avx2 processor which is gcc's name for Haswell.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141939
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 14 Oct 2011 03:04:24 +0000 (03:04 +0000)]
Definition of function getMipsRegisterNumbering.
Patch by Jack Carter and Reed Kotler at Mips.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141938
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 14 Oct 2011 02:55:47 +0000 (02:55 +0000)]
Add definition of class MipsELFWriterInfo.
Patch by Jack Carter and Reed Kotler at Mips.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141937
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 14 Oct 2011 02:47:50 +0000 (02:47 +0000)]
Add missing relocation types.
Patch by Jack Carter and Reed Kotler at Mips.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141936
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 14 Oct 2011 02:43:18 +0000 (02:43 +0000)]
Add ELF relocation types for Mips.
Patch by Jack Carter and Reed Kotler at Mips.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141935
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 14 Oct 2011 02:38:56 +0000 (02:38 +0000)]
Fixup enumerations.
Patch by Jack Carter at Mips.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141934
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 14 Oct 2011 02:17:30 +0000 (02:17 +0000)]
Add more Mips relocation types.
Patch by Jack Carter at Mips.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141932
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 14 Oct 2011 01:00:49 +0000 (01:00 +0000)]
Ban rematerializable instructions with side effects.
TableGen infers unmodeled side effects on instructions without a
pattern. Fix some instruction definitions where that was overlooked.
Also raise an error if a rematerializable instruction has unmodeled side
effects. That doen't make any sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141929
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 14 Oct 2011 00:39:50 +0000 (00:39 +0000)]
V_SET0 has no side effects.
TableGen will mark any pattern-less instruction as having unmodeled side
effects. This is extra bad for V_SET0 which gets rematerialized a lot.
This was part of the cause for PR11125, but the real bug was fixed
in r141923.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141924
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 14 Oct 2011 00:34:31 +0000 (00:34 +0000)]
Add value numbers when spilling dead defs.
When spilling around an instruction with a dead def, remember to add a
value number for the def.
The missing value number wouldn't normally create problems since there
would be an incoming live range as well. However, due to another bug
we could spill a dead V_SET0 instruction which doesn't read any values.
The missing value number caused an empty live range to be created which
is dangerous since it doesn't interfere with anything.
This fixes part of PR11125.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141923
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 13 Oct 2011 23:48:33 +0000 (23:48 +0000)]
Avoid undefined behavior in negation in LSR. Patch by Ahmed Charles.
Someone more familiar with LSR should double-check that the extra cast is actually doing the right thing in the overflow cases; I'm not completely confident that's that case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141916
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 13 Oct 2011 23:36:06 +0000 (23:36 +0000)]
Fix undefined shift. Patch by Ahmed Charles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141914
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 13 Oct 2011 23:27:48 +0000 (23:27 +0000)]
Simplify assertion, and avoid undefined shift. Based on patch by Ahmed Charles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141912
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 13 Oct 2011 23:16:01 +0000 (23:16 +0000)]
Support/Windows: Add support modifying memory permissions on Windows. Patch by Aaron Ballman!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141910
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 13 Oct 2011 23:13:35 +0000 (23:13 +0000)]
Fix undefined shifts and abs in Alpha backend. Based on patch by Ahmed Charles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141909
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 13 Oct 2011 23:10:56 +0000 (23:10 +0000)]
Support/Windows: Add efficent RW mutex on Windows. Patch by Aaron Ballman!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141907
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 13 Oct 2011 23:04:49 +0000 (23:04 +0000)]
Fixed typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141906
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 13 Oct 2011 22:49:56 +0000 (22:49 +0000)]
Avoid undefined behavior in signed integer negation. Patch by Ahmed Charles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141905
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 13 Oct 2011 22:40:23 +0000 (22:40 +0000)]
Simplify and avoid undefined shift. Based on patch by Ahmed Charles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141903
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 13 Oct 2011 22:30:10 +0000 (22:30 +0000)]
ELF: Fix the section that relocations apply to. Add test to verify. Patch by Danil Malyshev!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141901
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 13 Oct 2011 22:17:18 +0000 (22:17 +0000)]
llvm-object: Add inline relocation information to disassembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141897
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 13 Oct 2011 22:14:57 +0000 (22:14 +0000)]
Enhance the memdep interface so that users can tell the difference between a dependency which cannot be calculated and a path reaching the entry point of the function. This patch introduces isNonFuncLocal, which replaces isUnknown in some cases.
Patch by Xiaoyi Guo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141896
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 13 Oct 2011 21:55:29 +0000 (21:55 +0000)]
Reapply r141870, SCEV expansion of post-inc.
Speculatively reapply to see if this test case still crashes on
linux. I may have fixed it in my last checkin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141895
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 13 Oct 2011 21:43:44 +0000 (21:43 +0000)]
Don't forget to reconstruct D after changing the scope that we're
looking at.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141892
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Thu, 13 Oct 2011 21:08:11 +0000 (21:08 +0000)]
Update IntrinsicsXCore.td with the normal LLVM notice at the top of the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141889
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 13 Oct 2011 20:37:20 +0000 (20:37 +0000)]
llvm-objdump: Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141886
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 13 Oct 2011 20:37:08 +0000 (20:37 +0000)]
llvm-objdump: Fix dumping of multiple symbols with the same address.
This happens in COFF because there is a symbol for the beginning of each
section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141885
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 13 Oct 2011 20:36:54 +0000 (20:36 +0000)]
COFF: Implement sectionContainsSymbol for relocatable files only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141884
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 13 Oct 2011 18:49:23 +0000 (18:49 +0000)]
Fix memory corruption I introduced a few checkins ago.
Self-review easily caught this obvious bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141880
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 13 Oct 2011 18:04:52 +0000 (18:04 +0000)]
configure: [cygming] Set --disable-embed-stdcxx by default on --enable-shared.
Many distros provide stdc++.dll recently. --enable-embed-stdcxx might confuse people.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141875
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 13 Oct 2011 17:58:39 +0000 (17:58 +0000)]
SETEND is not allowed in an IT block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141874
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 13 Oct 2011 17:58:24 +0000 (17:58 +0000)]
Revert r141870. The test case crashes on linux with data corruption. A deeper issue was exposed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141873
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 13 Oct 2011 17:36:02 +0000 (17:36 +0000)]
docs/CMake.html: Clarify LLVM_LIT_TOOLS_DIR as :PATH.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141872
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 13 Oct 2011 17:33:52 +0000 (17:33 +0000)]
Fix incorrect ELF typedefs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141871
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 13 Oct 2011 17:31:47 +0000 (17:31 +0000)]
LSR: Reuse the post-inc expansion of expressions.
This avoids unnecessary expansion of expressions and allows the SCEV
expander to work on expression DAGs, not just trees.
Fixes PR11090.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141870
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 13 Oct 2011 17:27:34 +0000 (17:27 +0000)]
build: Remove some stray LLVMC configure variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141869
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 13 Oct 2011 17:21:09 +0000 (17:21 +0000)]
SCEV: Rewrite TrandformForPostIncUse to handle expression DAGs, not
just expression trees.
Partially fixes PR11090. Test case will be with the full fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141868
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 13 Oct 2011 17:06:38 +0000 (17:06 +0000)]
Slightly more useful tracing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141867
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 13 Oct 2011 14:27:54 +0000 (14:27 +0000)]
Force CPU type on test so it doesn't accidentally emit movbe instead of bswap on Intel Atom CPUs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141863
91177308-0d34-0410-b5e6-
96231b3b80d8
Kalle Raiskila [Thu, 13 Oct 2011 11:40:03 +0000 (11:40 +0000)]
Mark 'branch indirect' instruction as an indirect branch.
Not having it confused assembly printing of jumptables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141862
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 13 Oct 2011 08:24:19 +0000 (08:24 +0000)]
More closely follow libgcc, which has code after the `ret' instruction to
release the stack segment and reset the stack pointer. Place the code in its own
MBB to make the verifier happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141859
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 13 Oct 2011 07:48:07 +0000 (07:48 +0000)]
Revert r141854 because it was causing failures:
http://lab.llvm.org:8011/builders/llvm-x86_64-linux/builds/101
--- Reverse-merging r141854 into '.':
U test/MC/Disassembler/X86/x86-32.txt
U test/MC/Disassembler/X86/simple-tests.txt
D test/CodeGen/X86/bmi.ll
U lib/Target/X86/X86InstrInfo.td
U lib/Target/X86/X86ISelLowering.cpp
U lib/Target/X86/X86.td
U lib/Target/X86/X86Subtarget.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141857
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 13 Oct 2011 07:42:32 +0000 (07:42 +0000)]
Should not add instructions to a BB after a return instruction. The machine instruction verifier doesn't like this, nor do I.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141856
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 13 Oct 2011 07:36:41 +0000 (07:36 +0000)]
Use an existing method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141855
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 13 Oct 2011 07:09:14 +0000 (07:09 +0000)]
Add X86 TZCNT instruction and patterns to select it. Also added core-avx2 processor which is gcc's name for Haswell.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141854
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 13 Oct 2011 06:18:52 +0000 (06:18 +0000)]
Add 'implicit EFLAGS' to patterns for popcnt and lzcnt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141853
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 13 Oct 2011 03:30:21 +0000 (03:30 +0000)]
Elf_Word is not POD! Stop using it in a DenseMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141851
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 13 Oct 2011 02:16:18 +0000 (02:16 +0000)]
If MI is deleted then remove it from the set. If a new MI is created, it could
have the same address as the one we deleted, and we don't want that in the set
yet. Noticed by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141849
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 13 Oct 2011 01:09:50 +0000 (01:09 +0000)]
Tabs to spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141844
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 13 Oct 2011 00:54:59 +0000 (00:54 +0000)]
Add missing braces to pacify GCC's -Wparentheses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141842
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 13 Oct 2011 00:16:25 +0000 (00:16 +0000)]
Add missing ELF constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141840
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 12 Oct 2011 23:37:40 +0000 (23:37 +0000)]
Also inflate register classes around inline asm.
Now that MI->getRegClassConstraint() can also handle inline assembly,
don't bail when recomputing the register class of a virtual register
used by inline asm.
This fixes PR11078.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141836
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 12 Oct 2011 23:37:36 +0000 (23:37 +0000)]
Add MachineInstr::getRegClassConstraint().
Most instructions have some requirements for their register operands.
Usually, this is expressed as register class constraints in the
MCInstrDesc, but for inline assembly the constraints are encoded in the
flag words.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141835
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 12 Oct 2011 23:37:33 +0000 (23:37 +0000)]
Extract a method for finding the inline asm flag operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141834
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 12 Oct 2011 23:37:29 +0000 (23:37 +0000)]
Encode register class constreaints in inline asm instructions.
The inline asm operand constraint is initially encoded in the virtual
register for the operand, but that register class may change during
coalescing, and the original constraint is lost.
Encode the original register class as part of the flag word for each
inline asm operand. This makes it possible to recover the actual
constraint required by inline asm, just like we can for normal
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141833
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 12 Oct 2011 23:14:41 +0000 (23:14 +0000)]
Attempt to fix MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141831
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 12 Oct 2011 23:03:40 +0000 (23:03 +0000)]
We need to verify that the machine instruction we're using as a replacement for
our current machine instruction defines a register with the same register class
as what's being replaced. This showed up in the SPEC 403.gcc benchmark, where it
would ICE because a tail call was expecting one register class but was given
another. (The machine instruction verifier catches this situation.)
<rdar://problem/
10270968>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141830
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 12 Oct 2011 22:46:45 +0000 (22:46 +0000)]
Use a utility from MathExtras to clarify a check and avoid undefined behavior. Based on patch by Ahmed Charles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141829
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 12 Oct 2011 22:37:10 +0000 (22:37 +0000)]
The VMAs stored in the symbol table of a MachO file are absolute addresses, not offsets from the section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141828
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 12 Oct 2011 22:25:45 +0000 (22:25 +0000)]
Use unsigned multiply to hash integers, so we don't end up with undefined behavior for large signed integers. Based on patch by Ahmed Charles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141827
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 12 Oct 2011 22:24:17 +0000 (22:24 +0000)]
Removed colons from some target datalayout strings in test, since they don't match the required format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141825
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 12 Oct 2011 22:23:12 +0000 (22:23 +0000)]
Don't label a STAB debugging symbol as a function symbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141824
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 12 Oct 2011 22:21:32 +0000 (22:21 +0000)]
sectionContainsSymbol needs to be based on VMA's rather than section indices to properly account for files with segment load commands that contain no sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141822
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 12 Oct 2011 22:00:26 +0000 (22:00 +0000)]
Fix a couple hash functions so that they do not depend on undefined shifts. Based on patch by Ahmed Charles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141820
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 12 Oct 2011 21:59:02 +0000 (21:59 +0000)]
ARM addrmode5 represents the 'U' bit of the encoding backwards.
The disassembler needs to use the AM5 factory methods instead of just
building up the immediate directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141819
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 12 Oct 2011 21:56:19 +0000 (21:56 +0000)]
Fix APFloat::getSmallestNormalized so the shift doesn't depend on undefined behavior. Patch from Ahmed Charles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141818
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 12 Oct 2011 21:51:36 +0000 (21:51 +0000)]
Fix APFloat::getLargest so that it actually returns the correct value. Found by accident while reviewing a patch to nearby code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141816
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 12 Oct 2011 21:43:24 +0000 (21:43 +0000)]
Section indices in MachO symbol tables begin at 1, not 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141815
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Wed, 12 Oct 2011 21:38:39 +0000 (21:38 +0000)]
Finish supporting cpp #file/line comments in assembler for error messages. So
for cpp pre-processed assembly we give correct filename and line numbers when
reporting errors in assembly files when using clang and -integrated-as on .s
files. rdar://
8998895
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141814
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 12 Oct 2011 21:33:49 +0000 (21:33 +0000)]
Disable machine LICM speculation check (for profitability) until I have time to investigate the regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141813
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 12 Oct 2011 21:24:54 +0000 (21:24 +0000)]
To find the exiting VN of a LiveInterval from a block, use the previous slot
rather than the previous index. If a block has a single instruction, the
previous index may be in a different basic block.
I have no clue how this used to work on all of test-suite, because now this
failure is seen quite often when trying to compile code with -strong-phi-elim.
This fixes PR10252.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141812
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 12 Oct 2011 20:54:17 +0000 (20:54 +0000)]
Thumb2 assembly parsing and encoding for LDC/STC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141811
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 12 Oct 2011 20:20:48 +0000 (20:20 +0000)]
Hoist vector.size() computation out of the loop. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141807
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 12 Oct 2011 18:11:24 +0000 (18:11 +0000)]
addrmode2 is gone from these, so no need for the reg0 operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141794
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 12 Oct 2011 17:36:13 +0000 (17:36 +0000)]
ARM encoding tests for STC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141787
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 12 Oct 2011 17:34:41 +0000 (17:34 +0000)]
ARM parsing and encoding for the <option> form of LDC/STC instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141786
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 12 Oct 2011 16:36:01 +0000 (16:36 +0000)]
80 columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141781
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 12 Oct 2011 16:34:37 +0000 (16:34 +0000)]
Tidy up. Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141780
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 12 Oct 2011 15:56:56 +0000 (15:56 +0000)]
Fix a thinko that Nick noticed. The previous code actually worked as
intended, but only by accident.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141779
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 12 Oct 2011 10:28:55 +0000 (10:28 +0000)]
lib/Object/ELFObjectFile.cpp: Fix undefined behavior for MC/ELF/many-section.s not to fail (on msvc).
DenseMap::lookup(k) would return "default constructor value" when k was not met. It would be useless when value type were POD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141774
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 12 Oct 2011 02:58:01 +0000 (02:58 +0000)]
Expand the check for a landing pad so that it looks at the basic block's
containing loop's header to see if that's a landing pad. If it is, then we don't
want to hoist instructions out of the loop and above the header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141767
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 12 Oct 2011 01:24:51 +0000 (01:24 +0000)]
Use an existing function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141763
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 12 Oct 2011 01:05:13 +0000 (01:05 +0000)]
Define base class LogicNOR and make 32-bit and 64-bit NOR derive from it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141761
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 12 Oct 2011 00:56:06 +0000 (00:56 +0000)]
Fix encoding of 32-bit integer instructions. Change names of operands and nodes.
Remove unused classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141757
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 12 Oct 2011 00:38:05 +0000 (00:38 +0000)]
Make this use a public accessor too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141752
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 12 Oct 2011 00:14:31 +0000 (00:14 +0000)]
Add missing space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141750
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 12 Oct 2011 00:14:12 +0000 (00:14 +0000)]
Fix indent in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141749
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 12 Oct 2011 00:09:14 +0000 (00:09 +0000)]
Fix r141744.
1. The speculation check may not have been performed if the BB hasn't had a load
LICM candidate.
2. If the candidate would be CSE'ed, then go ahead and speculatively LICM the
instruction even if it's in high register pressure situation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141747
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 12 Oct 2011 00:06:23 +0000 (00:06 +0000)]
Fix -widen-vmovs liveness issues.
When widening a copy, we are reading a larger register that may not be
live. Use an <undef> flag to tell the register scavenger and machine
code verifier that we know the value isn't defined.
We now widen:
%S6<def> = COPY %S4<kill>, %D3<imp-def>
into:
%D3<def> = VMOVD %D2<undef>, pred:14, pred:%noreg, %S4<imp-use,kill>
This also keeps the <kill> flag on %S4 so we don't inadvertently kill a
live value in %S5.
Finally, ensure that ARMBaseInstrInfo::setExecutionDomain() preserves
the <undef> flag when converting VMOVD to VORR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141746
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 11 Oct 2011 23:48:44 +0000 (23:48 +0000)]
Refine r141689 with a tri-state variable.
Also teach MachineLICM to avoid "speculation" when register pressure is high.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141744
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 11 Oct 2011 23:43:48 +0000 (23:43 +0000)]
Change name of class to ArithOverflowR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141743
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 11 Oct 2011 23:38:52 +0000 (23:38 +0000)]
Define class ArithLogicI. Make 32-bit and 64-bit arithmetic and logical
instructions with two register operands derive from it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141742
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 11 Oct 2011 23:34:31 +0000 (23:34 +0000)]
Make this test more specific. There are 3 stats that matched "machine-licm".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141741
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 11 Oct 2011 23:19:35 +0000 (23:19 +0000)]
Use public accessors on the scope that is returned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141739
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 11 Oct 2011 23:12:12 +0000 (23:12 +0000)]
Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141737
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 11 Oct 2011 23:05:46 +0000 (23:05 +0000)]
Define classes ArithLogicR and ArithLogicOfR and make 32-bit and 64-bit
arithmetic and logical instructions with three register operands derive from
them. Fix instruction encoding too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141736
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Oct 2011 23:02:17 +0000 (23:02 +0000)]
target data is a contract with the code generator, not the "processor"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141734
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Oct 2011 23:01:39 +0000 (23:01 +0000)]
improve some of the documentation around target data layout strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141733
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 11 Oct 2011 22:59:11 +0000 (22:59 +0000)]
Add a new wrapper node for a DILexicalBlock that encapsulates it and a
file. Since it should only be used when necessary propagate it through
the backend code generation and tweak testcases accordingly.
This helps with code like in clang's test/CodeGen/debug-info-line.c where
we have multiple #line directives within a single lexical block and want
to generate only a single block that contains each file change.
Part of rdar://
10246360
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141729
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 11 Oct 2011 22:59:04 +0000 (22:59 +0000)]
Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141728
91177308-0d34-0410-b5e6-
96231b3b80d8