oota-llvm.git
15 years agoChange the MDNode uniquing to a ValueMap, at Devang's request.
Owen Anderson [Mon, 10 Aug 2009 18:16:08 +0000 (18:16 +0000)]
Change the MDNode uniquing to a ValueMap, at Devang's request.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78577 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosplit MachO section handling stuff out to its out .h/.cpp file.
Chris Lattner [Mon, 10 Aug 2009 18:15:01 +0000 (18:15 +0000)]
split MachO section handling stuff out to its out .h/.cpp file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78576 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a fixme
Chris Lattner [Mon, 10 Aug 2009 18:05:55 +0000 (18:05 +0000)]
add a fixme

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78575 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoarm only needs to emit one .align directive for hidden nlp's, not one
Chris Lattner [Mon, 10 Aug 2009 18:02:16 +0000 (18:02 +0000)]
arm only needs to emit one .align directive for hidden nlp's, not one
per pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78574 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomake sure that arm nonlazypointers are aligned properly
Chris Lattner [Mon, 10 Aug 2009 18:01:34 +0000 (18:01 +0000)]
make sure that arm nonlazypointers are aligned properly

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78573 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a weird ppc64-specific link error during an llvm-gcc build:
Chris Lattner [Mon, 10 Aug 2009 17:58:51 +0000 (17:58 +0000)]
Fix a weird ppc64-specific link error during an llvm-gcc build:
ld: bad offset (0x00000091) for lo14 instruction pic-base fix-up in ___popcountdi2 from libgcc/./_popcountsi2_s.o

The problem is that the non lazy symbol pointers need to be 8 byte aligned
on ppc64 and .section doesn't have an implicit alignment like ".non_lazy_symbol_pointer"
does.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78572 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix some warnings for the MSVC build, by Yonggang Luo!
Chris Lattner [Mon, 10 Aug 2009 17:35:42 +0000 (17:35 +0000)]
fix some warnings for the MSVC build, by Yonggang Luo!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78571 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake this comment more closely reflect the code.
Dan Gohman [Mon, 10 Aug 2009 16:50:32 +0000 (16:50 +0000)]
Make this comment more closely reflect the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78569 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd nounwind keywords.
Dan Gohman [Mon, 10 Aug 2009 16:48:40 +0000 (16:48 +0000)]
Add nounwind keywords.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78568 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support for printing loop structure information in asm comments.
David Greene [Mon, 10 Aug 2009 16:38:07 +0000 (16:38 +0000)]
Add support for printing loop structure information in asm comments.
This definitely slows down asm output so put it under an -asm-exuberant
flag.

This information is useful when doing static analysis of performance
issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78567 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoClarify limitations of a ModulePass requiring a FunctionPass.
Devang Patel [Mon, 10 Aug 2009 16:37:29 +0000 (16:37 +0000)]
Clarify limitations of a ModulePass requiring a FunctionPass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78566 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-mc/AsmParser: Check for matches with super classes when matching
Daniel Dunbar [Mon, 10 Aug 2009 16:05:47 +0000 (16:05 +0000)]
llvm-mc/AsmParser: Check for matches with super classes when matching
instruction operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78565 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCheckpoint scheduling itinerary changes.
David Goodwin [Mon, 10 Aug 2009 15:56:13 +0000 (15:56 +0000)]
Checkpoint scheduling itinerary changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78564 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPost RA scheduler changes. Introduce a hazard recognizer that uses the target schedul...
David Goodwin [Mon, 10 Aug 2009 15:55:25 +0000 (15:55 +0000)]
Post RA scheduler changes. Introduce a hazard recognizer that uses the target schedule information to accurately model the pipeline. Update the scheduler to correctly handle multi-issue targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78563 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWatch out for empty BB.
Evan Cheng [Mon, 10 Aug 2009 08:10:13 +0000 (08:10 +0000)]
Watch out for empty BB.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78562 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorev, rev16, and revsh do not set CPSR.
Evan Cheng [Mon, 10 Aug 2009 07:58:45 +0000 (07:58 +0000)]
rev, rev16, and revsh do not set CPSR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78561 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDuh. Most 16-bit Thumb rr instructions are two-address. Fix table.
Evan Cheng [Mon, 10 Aug 2009 07:20:37 +0000 (07:20 +0000)]
Duh. Most 16-bit Thumb rr instructions are two-address. Fix table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78560 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCPSR can be livein; transfer predicate operands correctly; tMUL is two-address.
Evan Cheng [Mon, 10 Aug 2009 06:57:42 +0000 (06:57 +0000)]
CPSR can be livein; transfer predicate operands correctly; tMUL is two-address.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78559 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support for folding loads / stores into 16-bit moves used by Thumb2.
Evan Cheng [Mon, 10 Aug 2009 06:32:05 +0000 (06:32 +0000)]
Add support for folding loads / stores into 16-bit moves used by Thumb2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78558 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago80 col violation.
Evan Cheng [Mon, 10 Aug 2009 05:51:48 +0000 (05:51 +0000)]
80 col violation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78557 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse tMOVgpr2gpr instead of t2MOVr.
Evan Cheng [Mon, 10 Aug 2009 05:49:43 +0000 (05:49 +0000)]
Use tMOVgpr2gpr instead of t2MOVr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78556 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support for a user supplied pointer argument to llvm_install_error_handler.
Daniel Dunbar [Mon, 10 Aug 2009 03:36:26 +0000 (03:36 +0000)]
Add support for a user supplied pointer argument to llvm_install_error_handler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78553 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove ConstantExpr handling to ResolveConstantExpr method and also
Bruno Cardoso Lopes [Mon, 10 Aug 2009 03:32:40 +0000 (03:32 +0000)]
Move ConstantExpr handling to ResolveConstantExpr method and also
add support for PtrToInt, Add, Mul.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78552 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support to reduce most of 32-bit Thumb2 arithmetic instructions.
Evan Cheng [Mon, 10 Aug 2009 02:37:24 +0000 (02:37 +0000)]
Add support to reduce most of 32-bit Thumb2 arithmetic instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78550 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAlways use the 16-bit tMOVgpr2gpr instead of the 32-bit t2MOVr.
Evan Cheng [Mon, 10 Aug 2009 02:06:53 +0000 (02:06 +0000)]
Always use the 16-bit tMOVgpr2gpr instead of the 32-bit t2MOVr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78549 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake the big switch: Change MCSectionMachO to represent a section *semantically*
Chris Lattner [Mon, 10 Aug 2009 01:39:42 +0000 (01:39 +0000)]
Make the big switch: Change MCSectionMachO to represent a section *semantically*
instead of syntactically as a string.  This means that it keeps track of the
segment, section, flags, etc directly and asmprints them in the right format.
This also includes parsing and validation support for llvm-mc and
"attribute(section)", so we should now start getting errors about invalid
section attributes from the compiler instead of the assembler on darwin.

Still todo:
1) Uniquing of darwin mcsections
2) Move all the Darwin stuff out to MCSectionMachO.[cpp|h]
3) there are a few FIXMEs, for example what is the syntax to get the
   S_GB_ZEROFILL segment type?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78547 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a simple back() method to StringRef.
Chris Lattner [Mon, 10 Aug 2009 00:44:02 +0000 (00:44 +0000)]
add a simple back() method to StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78544 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse abs64 instead abs; some platforms don't have a 64-bit abs overload. Noticed by...
Benjamin Kramer [Sun, 9 Aug 2009 22:37:07 +0000 (22:37 +0000)]
Use abs64 instead abs; some platforms don't have a 64-bit abs overload. Noticed by Yonggang Luo!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78543 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support to convert 32-bit instructions to 16-bit non-two-address ones.
Evan Cheng [Sun, 9 Aug 2009 19:17:19 +0000 (19:17 +0000)]
Add support to convert 32-bit instructions to 16-bit non-two-address ones.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78540 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoalways end a section with \n on elf.
Chris Lattner [Sun, 9 Aug 2009 15:31:10 +0000 (15:31 +0000)]
always end a section with \n on elf.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78534 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-mc/AsmParser: Fix thinko in ClassInfo::operator<.
Daniel Dunbar [Sun, 9 Aug 2009 08:23:23 +0000 (08:23 +0000)]
llvm-mc/AsmParser: Fix thinko in ClassInfo::operator<.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78533 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-mc/AsmParser: Add hack to ignore Int_* and *_Int instructions for now, to
Daniel Dunbar [Sun, 9 Aug 2009 08:19:00 +0000 (08:19 +0000)]
llvm-mc/AsmParser: Add hack to ignore Int_* and *_Int instructions for now, to
make it easier to see interesting ambiguities.
 - Also, check that user doesn't try to redefine the super class. This is a wart
   in the current design, in that assembler match classes aren't explicitly
   declared somewhere (so there isn't a unique place to declare the super
   class). This should probably be fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78532 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDisable this test for now, we don't check for super classes when matching yet.
Daniel Dunbar [Sun, 9 Aug 2009 07:35:56 +0000 (07:35 +0000)]
Disable this test for now, we don't check for super classes when matching yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78531 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-mc/AsmParser: Implement user defined super classes.
Daniel Dunbar [Sun, 9 Aug 2009 07:20:21 +0000 (07:20 +0000)]
llvm-mc/AsmParser: Implement user defined super classes.
 - We can now discriminate SUB32ri8 from SUB32ri, for example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78530 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd tests for Neon VZIP and VUZP instructions.
Bob Wilson [Sun, 9 Aug 2009 06:48:29 +0000 (06:48 +0000)]
Add tests for Neon VZIP and VUZP instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78529 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a test for Neon VTRN instructions.
Bob Wilson [Sun, 9 Aug 2009 06:30:46 +0000 (06:30 +0000)]
Add a test for Neon VTRN instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78528 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-mc/AsmParser: Separate instruction ordering for ambiguity detection.
Daniel Dunbar [Sun, 9 Aug 2009 06:05:33 +0000 (06:05 +0000)]
llvm-mc/AsmParser: Separate instruction ordering for ambiguity detection.
 - We want the ordering operation to be simple, since we run it on every
   match. The old ordering is also not a strict weak ordering when there are
   ambiguities, which makes MSVC unhappy.

 - While we are at it, detect all ambiguities instead of just the adjacent
   ones. There are actually 655, for X86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78526 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChange Neon table lookup (VTBL) and table extension (VTBX) intrinsics to
Bob Wilson [Sun, 9 Aug 2009 06:03:09 +0000 (06:03 +0000)]
Change Neon table lookup (VTBL) and table extension (VTBX) intrinsics to
take the table vectors as separate arguments, instead of the previous
approach where they were combined into one big vector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78525 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExtend comment on ParserMatchClass .td field, and add some missing
Daniel Dunbar [Sun, 9 Aug 2009 06:00:04 +0000 (06:00 +0000)]
Extend comment on ParserMatchClass .td field, and add some missing
classes for X86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78524 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-mc/AsmParser: Define match classes in the .td file.
Daniel Dunbar [Sun, 9 Aug 2009 05:18:30 +0000 (05:18 +0000)]
llvm-mc/AsmParser: Define match classes in the .td file.
 -2 FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78523 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-mc/AsmParser: Sketch infrastructure for ordering instructions & detecting
Daniel Dunbar [Sun, 9 Aug 2009 04:00:06 +0000 (04:00 +0000)]
llvm-mc/AsmParser: Sketch infrastructure for ordering instructions & detecting
ambiguities.
 - Currently there are 483 ambiguities to resolve. :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78522 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSTLExtras: Add less_ptr.
Daniel Dunbar [Sun, 9 Aug 2009 03:36:59 +0000 (03:36 +0000)]
STLExtras: Add less_ptr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78521 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix edito
Chris Lattner [Sat, 8 Aug 2009 23:43:55 +0000 (23:43 +0000)]
fix edito

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78520 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-mc/AsmMatcher: Tweak string matcher (missed a newline).
Daniel Dunbar [Sat, 8 Aug 2009 23:43:16 +0000 (23:43 +0000)]
llvm-mc/AsmMatcher: Tweak string matcher (missed a newline).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78518 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosink the 'name' and 'isdirective' state out of MCSection into its derived classes.
Chris Lattner [Sat, 8 Aug 2009 23:39:42 +0000 (23:39 +0000)]
sink the 'name' and 'isdirective' state out of MCSection into its derived classes.
This totally optimizes PIC16 sections by not having an 'isdirective' bit anymore!! ;-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78517 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse subclassing to print lane-like immediates (w/o hash) eliminating
Anton Korobeynikov [Sat, 8 Aug 2009 23:10:41 +0000 (23:10 +0000)]
Use subclassing to print lane-like immediates (w/o hash) eliminating
'no_hash' modifier. Hopefully this will make Daniel happy :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78514 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-mc/AsmMatcher: Tweak string matcher.
Daniel Dunbar [Sat, 8 Aug 2009 22:57:25 +0000 (22:57 +0000)]
llvm-mc/AsmMatcher: Tweak string matcher.
 - Track whether we need to insert an explicit 'break'.

 - Invert conditional when matching a single prefix to reduce
   nesting/bracing/breaking.

 - wc -l of X86GenAsmMatcher.inc decreased by 10%. :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78513 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove nondeterminstic test.
Chris Lattner [Sat, 8 Aug 2009 22:56:37 +0000 (22:56 +0000)]
remove nondeterminstic test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78512 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a note about dead zero extends.
Chris Lattner [Sat, 8 Aug 2009 22:46:59 +0000 (22:46 +0000)]
add a note about dead zero extends.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78511 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago1. Make MCSection an abstract class.
Chris Lattner [Sat, 8 Aug 2009 22:41:53 +0000 (22:41 +0000)]
1. Make MCSection an abstract class.
2. Move section switch printing to MCSection virtual method which takes a
   TAI.  This eliminates textual formatting stuff from TLOF.
3. Eliminate SwitchToSectionDirective, getSectionFlagsAsString, and
   TLOFELF::AtIsCommentChar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78510 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoswitch this to create coff sections for now, it doesn't really matter for
Chris Lattner [Sat, 8 Aug 2009 22:38:48 +0000 (22:38 +0000)]
switch this to create coff sections for now, it doesn't really matter for
llvm-mc's purpose yet and we'll want to switch to creating semantic sections
at some point.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78509 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd crc32 instruction and intrinsics. Add a new class of prefix
Eric Christopher [Sat, 8 Aug 2009 21:55:08 +0000 (21:55 +0000)]
Add crc32 instruction and intrinsics. Add a new class of prefix
bytes for F2 0F 38 and propagate. Add a FIXME for a set
of possibilities which correspond to intrinsics already used.

New test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78508 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support for READCYCLECOUNTER in Blackfin back-end.
Jakob Stoklund Olesen [Sat, 8 Aug 2009 21:42:22 +0000 (21:42 +0000)]
Add support for READCYCLECOUNTER in Blackfin back-end.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78506 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd new PIC16Section class, this time hopefully not breaking the build :)
Chris Lattner [Sat, 8 Aug 2009 21:37:01 +0000 (21:37 +0000)]
add new PIC16Section class, this time hopefully not breaking the build :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78505 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-mc/AsmMatcher: Switch token matching to use the new string matcher.
Daniel Dunbar [Sat, 8 Aug 2009 21:22:41 +0000 (21:22 +0000)]
llvm-mc/AsmMatcher: Switch token matching to use the new string matcher.

Also, redefined MatchRegisterName to just return the register value or a
sentinel, to simplify the generated code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78504 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert r78501, it doesn't build.
Daniel Dunbar [Sat, 8 Aug 2009 21:12:40 +0000 (21:12 +0000)]
Revert r78501, it doesn't build.

 --- Reverse-merging r78501 into '.':
U    lib/Target/PIC16/PIC16TargetObjectFile.cpp
D    lib/Target/PIC16/PIC16Section.h

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78503 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomake PIC16 create its own custom MCSection.
Chris Lattner [Sat, 8 Aug 2009 20:55:25 +0000 (20:55 +0000)]
make PIC16 create its own custom MCSection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78501 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomake target-specific TLOF impls (except PIC16) create target-specific
Chris Lattner [Sat, 8 Aug 2009 20:52:13 +0000 (20:52 +0000)]
make target-specific TLOF impls (except PIC16) create target-specific
MCSection instances.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78500 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agostub out PECOFF/MachO/ELF MCSection classes
Chris Lattner [Sat, 8 Aug 2009 20:50:49 +0000 (20:50 +0000)]
stub out PECOFF/MachO/ELF MCSection classes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78499 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoeliminate TargetLoweringObjectFileSparc in favor of a TAI hook.
Chris Lattner [Sat, 8 Aug 2009 20:43:12 +0000 (20:43 +0000)]
eliminate TargetLoweringObjectFileSparc in favor of a TAI hook.
A TAI hook is appropriate in this case because this is just an
asm syntax issue, not a semantic difference. TLOF should model
the semantics of the section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78498 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't build illegal ops in DAGCombiner::SimplifyBinOpWithSameOpcodeHands().
Jakob Stoklund Olesen [Sat, 8 Aug 2009 20:42:17 +0000 (20:42 +0000)]
Don't build illegal ops in DAGCombiner::SimplifyBinOpWithSameOpcodeHands().

Blackfin supports and/or/xor on i32 but not on i16. Teach
DAGCombiner::SimplifyBinOpWithSameOpcodeHands to not produce illegal nodes
after legalize ops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78497 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agogive pic16 a target-specific section creation name too
Chris Lattner [Sat, 8 Aug 2009 20:23:47 +0000 (20:23 +0000)]
give pic16 a target-specific section creation name too

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78496 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agonow that getOrCreateSection is all object-file specific,
Chris Lattner [Sat, 8 Aug 2009 20:22:20 +0000 (20:22 +0000)]
now that getOrCreateSection is all object-file specific,
give the impls an object-file-specific name.  In the future
they can take different arguments etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78495 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosink getOrCreateSection down into all the object file implementations,
Chris Lattner [Sat, 8 Aug 2009 20:14:13 +0000 (20:14 +0000)]
sink getOrCreateSection down into all the object file implementations,
now that they create *all* the sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78494 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix some cut and paste-os.
Eric Christopher [Sat, 8 Aug 2009 20:09:33 +0000 (20:09 +0000)]
Fix some cut and paste-os.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78493 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a little function to do arbitrary string pattern matching in a
Chris Lattner [Sat, 8 Aug 2009 20:02:57 +0000 (20:02 +0000)]
add a little function to do arbitrary string pattern matching in a
much more efficient way than a sequence of if's.  Switch MatchRegisterName
to use it.  It would be nice if someone could factor this out to a shared
place in tblgen :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78492 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd another const
Chris Lattner [Sat, 8 Aug 2009 19:16:05 +0000 (19:16 +0000)]
add another const

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78487 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove a useless anon-ns, make table const.
Chris Lattner [Sat, 8 Aug 2009 19:15:25 +0000 (19:15 +0000)]
remove a useless anon-ns, make table const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78486 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSome ProfileInfo cleanups.
Daniel Dunbar [Sat, 8 Aug 2009 18:59:03 +0000 (18:59 +0000)]
Some ProfileInfo cleanups.
 - Part of optimal static profiling patch sequence by Andreas Neustifter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78485 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a basic static ProfileInfo provider (ProfileEstimatorPass).
Daniel Dunbar [Sat, 8 Aug 2009 18:44:18 +0000 (18:44 +0000)]
Add a basic static ProfileInfo provider (ProfileEstimatorPass).
 - Part of optimal static profiling patch sequence by Andreas Neustifter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78484 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDefine intrinsics for crc instruction.
Eric Christopher [Sat, 8 Aug 2009 18:07:59 +0000 (18:07 +0000)]
Define intrinsics for crc instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78482 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse reloc_absolute_word_sext relocation for X86::MOV64(ri/mi)32 instructions,
Bruno Cardoso Lopes [Sat, 8 Aug 2009 17:47:41 +0000 (17:47 +0000)]
Use reloc_absolute_word_sext relocation for X86::MOV64(ri/mi)32 instructions,
since they are in 64 bit mode with i64immSExt32 imms. JIT is not affected since
it handles both word absolute relocations in the same way

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78479 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMore ProfileInfo improvements.
Daniel Dunbar [Sat, 8 Aug 2009 17:43:09 +0000 (17:43 +0000)]
More ProfileInfo improvements.
 - Part of optimal static profiling patch sequence by Andreas Neustifter.

 - Store edge, block, and function information separately for each functions
   (instead of in one giant map).

 - Return frequencies as double instead of int, and use a sentinel value for
   missing information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78477 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoELF improvements:
Bruno Cardoso Lopes [Sat, 8 Aug 2009 17:29:04 +0000 (17:29 +0000)]
ELF improvements:
Handle large integers, x86_fp80, ConstantAggregateZero, and two more ConstantExpr:
GetElementPtr and IntToPtr
Set SHF_MERGE bit for mergeable strings
Avoid zero initialized strings to be classified as a bss symbol
Don't allow common symbols to be classified as STB_WEAK
Add a constant to be used as a global value offset in data relocations

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78476 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate CMake
Daniel Dunbar [Sat, 8 Aug 2009 17:03:13 +0000 (17:03 +0000)]
Update CMake

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78475 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoClean out per-function data after the machine code verifier is done with it.
Jakob Stoklund Olesen [Sat, 8 Aug 2009 15:34:50 +0000 (15:34 +0000)]
Clean out per-function data after the machine code verifier is done with it.

Also don't dereference old pointers after they have been deleted causing
random crashes when enabling the machine code verifier.

Ahem...

I have not included a test case for the crash. It hapened when enabling the
verifier on CodeGen/X86/2009-08-06-branchfolder-crash.ll.

The crash depends on an MBB being allocated at the same address as a
previously deleted MBB. I don't think that can be reproduced reliably.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78472 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd insert_elt / extract_elt patterns for v4f32 stuff.
Anton Korobeynikov [Sat, 8 Aug 2009 14:06:07 +0000 (14:06 +0000)]
Add insert_elt / extract_elt patterns for v4f32 stuff.
Did anyone tests v4f32 ever?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78470 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLane number should be printed w/o hash
Anton Korobeynikov [Sat, 8 Aug 2009 14:05:53 +0000 (14:05 +0000)]
Lane number should be printed w/o hash

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78469 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse VLDM / VSTM to spill/reload 128-bit Neon registers
Anton Korobeynikov [Sat, 8 Aug 2009 13:35:48 +0000 (13:35 +0000)]
Use VLDM / VSTM to spill/reload 128-bit Neon registers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78468 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate the machine code verifier to keep up with the scavenger.
Jakob Stoklund Olesen [Sat, 8 Aug 2009 13:19:25 +0000 (13:19 +0000)]
Update the machine code verifier to keep up with the scavenger.

* Cleaner handling of <undef>.
* <def> takes precedence over <def,dead>.
* Implement the OK-to-redefine-a-register-that-was-
  live-in-but-has-not-been-used-before rule.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78467 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove RegisterScavenger::isSuperRegUsed(). This completely reverses the mistaken...
Jakob Stoklund Olesen [Sat, 8 Aug 2009 13:19:10 +0000 (13:19 +0000)]
Remove RegisterScavenger::isSuperRegUsed(). This completely reverses the mistaken commit r77904.

Now there is no special treatment of instructions that redefine part of a
super-register. Instead, the super-register is marked with <imp-use,kill> and
<imp-def>. For instance, from LowerSubregs on ARM:

subreg: CONVERTING: %Q1<def> = INSERT_SUBREG %Q1<undef>, %D1<kill>, 5
subreg: %D2<def> = FCPYD %D1<kill>, 14, %reg0, %Q1<imp-def>

subreg: CONVERTING: %Q1<def> = INSERT_SUBREG %Q1, %D0<kill>, 6
subreg: %D3<def> = FCPYD %D0<kill>, 14, %reg0, %Q1<imp-use,kill>, %Q1<imp-def>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78466 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify RegScavenger::forward a bit more.
Jakob Stoklund Olesen [Sat, 8 Aug 2009 13:18:47 +0000 (13:18 +0000)]
Simplify RegScavenger::forward a bit more.

Verify that early clobber registers and their aliases are not used.

All changes to RegsAvailable are now done as a transaction so the order of
operands makes no difference.

The included test case is from PR4686. It has behaviour that was dependent on the order of operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78465 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomove this fp select into a pattern
Andrew Lenharth [Sat, 8 Aug 2009 12:49:07 +0000 (12:49 +0000)]
move this fp select into a pattern

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78464 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAlways initialize AsmConds.
Benjamin Kramer [Sat, 8 Aug 2009 11:26:50 +0000 (11:26 +0000)]
Always initialize AsmConds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78463 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMSVC doesn't like member variables with the same name as the class.
Benjamin Kramer [Sat, 8 Aug 2009 10:06:30 +0000 (10:06 +0000)]
MSVC doesn't like member variables with the same name as the class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78462 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-mc/AsmMatcher: Improve match code.
Daniel Dunbar [Sat, 8 Aug 2009 07:50:56 +0000 (07:50 +0000)]
llvm-mc/AsmMatcher: Improve match code.
 - This doesn't actually improve the algorithm (its still linear), but the
   generated (match) code is now fairly compact and table driven. Still need a
   generic string matcher.

 - The table still needs to be compressed, this is quite simple to do and should
   shrink it to under 16k.

 - This also simplifies and restructures the code to make the match classes more
   explicit, in anticipation of resolving ambiguities.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78461 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement Neon VZIP and VUZP instructions. These are very similar to VTRN,
Bob Wilson [Sat, 8 Aug 2009 06:13:25 +0000 (06:13 +0000)]
Implement Neon VZIP and VUZP instructions.  These are very similar to VTRN,
so I generalized the class for VTRN in the .td file to handle all 3 of them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78460 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement Neon VTRN instructions. For now, anyway, these are selected
Bob Wilson [Sat, 8 Aug 2009 05:53:00 +0000 (05:53 +0000)]
Implement Neon VTRN instructions.  For now, anyway, these are selected
directly from the intrinsics produced by the frontend.  If it is more
convenient to have a custom DAG node for using these to implement shuffles,
we can add that later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78459 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-mc/AsmMatcher: Switch to a unified function to convert operands to MCInst,
Daniel Dunbar [Sat, 8 Aug 2009 05:24:34 +0000 (05:24 +0000)]
llvm-mc/AsmMatcher: Switch to a unified function to convert operands to MCInst,
so that terminal states are as simple as possible.
 - If we were willing to assume that the order that operands get inserted in the
   MCInst is fixed we could actually dispose with this altogether, although it
   might be nice to have the flexibility to change it later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78458 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a skeleton Thumb2 instruction size reduction pass.
Evan Cheng [Sat, 8 Aug 2009 03:21:23 +0000 (03:21 +0000)]
Add a skeleton Thumb2 instruction size reduction pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78456 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCode refactoring. No functionality change.
Evan Cheng [Sat, 8 Aug 2009 03:20:32 +0000 (03:20 +0000)]
Code refactoring. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78455 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agotADDhirr should target GPR, not tGPR.
Evan Cheng [Sat, 8 Aug 2009 03:19:44 +0000 (03:19 +0000)]
tADDhirr should target GPR, not tGPR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78454 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoI can type.
Evan Cheng [Sat, 8 Aug 2009 02:54:37 +0000 (02:54 +0000)]
I can type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78453 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomake printInstruction return void since its result is omitted. Make the
Chris Lattner [Sat, 8 Aug 2009 01:32:19 +0000 (01:32 +0000)]
make printInstruction return void since its result is omitted.  Make the
error condition get trapped with an assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78449 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix some -Asserts unused variable warnings.
Daniel Dunbar [Sat, 8 Aug 2009 00:40:46 +0000 (00:40 +0000)]
Fix some -Asserts unused variable warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78447 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd another Strong-SIV testcase.
Andreas Bolka [Sat, 8 Aug 2009 00:21:49 +0000 (00:21 +0000)]
Add another Strong-SIV testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78446 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agodon't check the result of printInstruction anymore.
Chris Lattner [Sat, 8 Aug 2009 00:05:42 +0000 (00:05 +0000)]
don't check the result of printInstruction anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78444 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not generate 32-bit call on win64 when imm does not fit
Anton Korobeynikov [Fri, 7 Aug 2009 23:59:21 +0000 (23:59 +0000)]
Do not generate 32-bit call on win64 when imm does not fit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78443 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorename test
Chris Lattner [Fri, 7 Aug 2009 23:57:30 +0000 (23:57 +0000)]
rename test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78441 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomerge a bunch of tests together into one, convert to filecheck which
Chris Lattner [Fri, 7 Aug 2009 23:56:42 +0000 (23:56 +0000)]
merge a bunch of tests together into one, convert to filecheck which
is more tolerant of whitespace differences.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78439 91177308-0d34-0410-b5e6-96231b3b80d8