Commit Graph

94637 Commits

Author SHA1 Message Date
Chris Lattner b80ab36179 Give AsmMatcherInfo a CodeGenTarget, which simplifies a bunch of
argument passing.  Consolidate all SingletonRegister detection
and handling into a new 
InstructionInfo::getSingletonRegisterForToken method instead of
having it scattered about.  No change in generated .inc files.

llvm-svn: 117888
2010-11-01 01:37:30 +00:00
John McCall e6e622e789 Only apply -fvisibility-inlines-hidden to definitions. Apparently
isInlined() just gives meaningless results for non-definitions.

Fixes rdar://problem/8614470

llvm-svn: 117887
2010-11-01 01:29:57 +00:00
Chris Lattner 25d9c7fa2e move FlattenVariants out of AsmMatcherEmitter into a shared
CodeGenInstruction::FlattenAsmStringVariants method.  Use it
to simplify the code in AsmWriterInst, which now no longer 
needs to worry about variants.

llvm-svn: 117886
2010-11-01 01:07:14 +00:00
Chris Lattner 40dd3f0939 add a FIXME, $lane in ARM is an issue that needs to be resolved before
this can start rejecting instructions.

llvm-svn: 117885
2010-11-01 00:51:32 +00:00
Chris Lattner 941c19b7ba reject instructions that contain a \n in their asmstring. Mark
various X86 and ARM instructions that are bitten by this as isCodeGenOnly,
as they are.

llvm-svn: 117884
2010-11-01 00:46:16 +00:00
Anders Carlsson 0a14ee9ed8 Get rid of more calls to getBaseClassOffsetInBits.
llvm-svn: 117883
2010-11-01 00:21:58 +00:00
Anders Carlsson 3f01871647 Port over a couple of getVBaseClassOffsetInBits call sites to use getVBaseClassOffset instead.
llvm-svn: 117882
2010-10-31 23:45:59 +00:00
Anders Carlsson fd88a6160d Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset.
llvm-svn: 117881
2010-10-31 23:22:37 +00:00
Chandler Carruth baa5126dbc Add a specialization for 'long', a hole in the set of fundamental
specializations provided here. This is a little annoying because its size
changes from platform to platform. If possible, I may follow up with a patch
that uses standard constants to simplify much of this, but assuming for now
that was avoided for a reason.

llvm-svn: 117880
2010-10-31 22:57:03 +00:00
Eric Christopher ef5a1c3ec3 Revert r117876 for now, it's causing more testsuite failures.
llvm-svn: 117879
2010-10-31 22:42:55 +00:00
Anders Carlsson a2f8e41a0a Start converting over the RecordLayoutBuilder next.
llvm-svn: 117878
2010-10-31 22:20:42 +00:00
Anders Carlsson 28466ab8f4 EmptyObjectMap now uses CharUnits wherever possible.
llvm-svn: 117877
2010-10-31 22:13:23 +00:00
Bill Wendling 0392f1b437 Disable the peephole optimizer until 186.crafty on armv6 is fixed. This is what
looks like is happening:

Without the peephole optimizer:
  (1)   sub     r6, r6, #32
        orr     r12, r12, lr, lsl r9
        orr     r2, r2, r3, lsl r10
  (x)   cmp     r6, #0
        ldr     r9, LCPI2_10
        ldr     r10, LCPI2_11
  (2)   sub     r8, r8, #32
  (a)   movge   r12, lr, lsr r6
  (y)   cmp     r8, #0
LPC2_10:
        ldr     lr, [pc, r10]
  (b)   movge   r2, r3, lsr r8

With the peephole optimizer:
        ldr     r9, LCPI2_10
        ldr     r10, LCPI2_11
  (1*)  subs    r6, r6, #32
  (2*)  subs    r8, r8, #32
  (a*)  movge   r12, lr, lsr r6
  (b*)  movge   r2, r3, lsr r8

(1) is used by (x) for the conditional move at (a). (2) is used by (y) for the
conditional move at (b). After the peephole optimizer, these the flags resulting
from (1*) are ignored and only the flags from (2*) are considered for both
conditional moves.

llvm-svn: 117876
2010-10-31 22:07:12 +00:00
Anders Carlsson 233e272775 More CharUnits conversion.
llvm-svn: 117875
2010-10-31 21:54:55 +00:00
Anders Carlsson 725190ff3f More CharUnits conversion.
llvm-svn: 117874
2010-10-31 21:39:24 +00:00
Anders Carlsson f8f756d1d5 Use CharUnits in the EmptyClassOffsets map.
llvm-svn: 117873
2010-10-31 21:22:43 +00:00
Anders Carlsson 5fd3e86cce Add a DenseMapInfo specializaiton for CharUnits.
llvm-svn: 117872
2010-10-31 21:17:03 +00:00
Nick Lewycky 508ef2c350 Correct typos and whitespace, spotted by Nico Weber!
llvm-svn: 117871
2010-10-31 21:07:24 +00:00
Nick Lewycky 3763105100 Fix typo spotted by Nico Weber.
llvm-svn: 117870
2010-10-31 21:04:33 +00:00
Anders Carlsson 22f5720c27 Baby steps towards using only CharUnits for base class offsets in ASTRecordLayout. Start by storing the offsets in CharUnits in the ASTRecordLayout object.
llvm-svn: 117869
2010-10-31 21:01:46 +00:00
Anders Carlsson 1827509176 Teach the constant expr evaluator about derived-to-base casts when no virtual bases are involved. Fixes PR5974.
llvm-svn: 117868
2010-10-31 20:41:46 +00:00
Nicolas Geoffray 3dbe6cc155 Attach a GCModuleInfo to a MachineFunction.
llvm-svn: 117867
2010-10-31 20:38:38 +00:00
Greg Clayton b9c7a9ae07 Make sure darwin-debug gets installed in /Developer/usr/bin instead of
/usr/local/bin.

llvm-svn: 117866
2010-10-31 20:13:10 +00:00
Greg Clayton fac83d83d1 Bumped lldb Xcode project version to 28 for lldb-28.
llvm-svn: 117865
2010-10-31 19:58:25 +00:00
Greg Clayton 38adbbb88b Fixed an include so case sensitive builders can build.
llvm-svn: 117864
2010-10-31 19:57:43 +00:00
Chris Lattner d689026899 fix a crash on:
let Constraints = "$val = $dst", Defs = [EFLAGS] in, isCodeGenOnly = 1 {

we now get:

X86InstrCompiler.td:653:52: error: Expected class, def, defm, multiclass or let definition
let Constraints = "$val = $dst", Defs = [EFLAGS] in, isCodeGenOnly = 1 {
                                                   ^

llvm-svn: 117863
2010-10-31 19:27:15 +00:00
Chris Lattner 7ff334687d fix the !eq operator in tblgen to return a bit instead of an int.
Use this to make the X86 and ARM targets set isCodeGenOnly=1 
automatically for their instructions that have Format=Pseudo,
resolving a hack in tblgen.

llvm-svn: 117862
2010-10-31 19:22:57 +00:00
Chris Lattner 9492c17baf two changes: make the asmmatcher generator ignore ARM pseudos properly,
and make it a hard error for instructions to not have an asm string.
These instructions should be marked isCodeGenOnly.

llvm-svn: 117861
2010-10-31 19:15:18 +00:00
Chris Lattner 33fc3e095b reapply r117858 with apparent editor malfunction fixed (somehow I
got a dulicated line).

llvm-svn: 117860
2010-10-31 19:10:56 +00:00
Chris Lattner e59eef3dd1 revert r117858 while I check out a failure I missed.
llvm-svn: 117859
2010-10-31 19:05:32 +00:00
Chris Lattner 9293008e90 the asm matcher can't handle operands with modifiers (like ${foo:bar}).
Instead of silently ignoring these instructions, emit a hard error and
force the target author to either refactor the target or mark the 
instruction 'isCodeGenOnly'.

Mark a few instructions in ARM and MBlaze as isCodeGenOnly the are 
doing this.

llvm-svn: 117858
2010-10-31 18:48:12 +00:00
Chris Lattner eb8c0fc2eb sketch out the planned instruction alias mechanism, add some comments about
how the push/pop mnemonic aliases are wrong.

llvm-svn: 117857
2010-10-31 18:43:46 +00:00
Duncan Sands fb0a48ef96 Factorize the duplicated logic for choosing the right argument
calling convention out of the fast and normal ISel files, and
into the calling convention TD file.

llvm-svn: 117856
2010-10-31 13:21:44 +00:00
Duncan Sands fa7e6f2417 Remove CCAssignFnForRet from X86 FastISel in favour of RetCC_X86,
which has the same logic specified in the CallingConv TD file.
This brings FastISel in line with the standard X86 ISel.

llvm-svn: 117855
2010-10-31 13:02:38 +00:00
Duncan Sands df71c2c9c7 Explain the return value of CCAssignFn.
llvm-svn: 117854
2010-10-31 10:29:14 +00:00
Zhanyong Wan e4f7df694d Make Clang static analyzer skip function template definitions. This fixes Clang PR 8426, 8427, & 8433. Reviewed by Ted Kremenek and Doug Gregor.
llvm-svn: 117853
2010-10-31 04:22:34 +00:00
Greg Clayton e6f21e4e6e Bumped version in Xcode project to lldb-27, and debugserver to debugserver-115.
llvm-svn: 117852
2010-10-31 03:02:30 +00:00
Greg Clayton cfd1aced7e Cleaned up the API logging a lot more to reduce redundant information and
keep the file size a bit smaller.

Exposed SBValue::GetExpressionPath() so SBValue users can get an expression
path for their values.

llvm-svn: 117851
2010-10-31 03:01:06 +00:00
Anders Carlsson a5df61a341 Don't try to evaluate the LHS or RHS of a member pointer binary operation. Fixes PR8507.
llvm-svn: 117850
2010-10-31 01:21:47 +00:00
Rafael Espindola 3fe87a1eed Add support for files with more than 65280 sections. No testcase since
it would be a bit too big :-)

llvm-svn: 117849
2010-10-31 00:16:26 +00:00
Eric Christopher 04b0a3e651 Make sure we have a legal type (and simple) before continuing.
llvm-svn: 117848
2010-10-30 21:25:26 +00:00
Benjamin Kramer c940bcf564 Validate HTML.
llvm-svn: 117847
2010-10-30 21:07:28 +00:00
Chris Lattner 4dd6ca9a69 add missing tag
llvm-svn: 117846
2010-10-30 20:21:00 +00:00
Chris Lattner 43690071cf have GetAliasRequiredFeatures get its features from
AsmMatcherInfo so we don't have two places that know the
feature -> enum mapping.  No functionality change.

llvm-svn: 117845
2010-10-30 20:15:02 +00:00
Chris Lattner a0e871901b simplify code that creates SubtargetFeatureInfo, ensuring that features
that are only used by MnemonicAliases will be found.

llvm-svn: 117844
2010-10-30 20:07:57 +00:00
Chris Lattner 25896af4bb fix a fixme in stringmatcher, having it generate nice looking code if the
'tomatch' code contains \n's.

llvm-svn: 117843
2010-10-30 19:57:17 +00:00
Argyrios Kyrtzidis d3f0054395 Emit an error when trying to form a pointer-to-member to a bitfield.
As a bonus, avoids a crash on the IRGen side due to accepting invalid code.

llvm-svn: 117842
2010-10-30 19:52:22 +00:00
Argyrios Kyrtzidis 52355c8020 renamed: test/SemaCXX/ptrtomember-badcall.cpp -> test/SemaCXX/ptrtomember.cpp
llvm-svn: 117841
2010-10-30 19:52:19 +00:00
Chris Lattner f9ec2fb34a fix typos and some serious bugs in feature handling (but not for
cases that are currently exercised).  Thanks to Frits van Bommel for
the great review!

llvm-svn: 117840
2010-10-30 19:47:49 +00:00
Chris Lattner aac142cc06 Resolve a terrible hack in tblgen: instead of hardcoding
"In32BitMode" and "In64BitMode" into tblgen, allow any
predicate that inherits from AssemblerPredicate.

llvm-svn: 117831
2010-10-30 19:38:20 +00:00