Commit Graph

90901 Commits

Author SHA1 Message Date
Chris Lattner 6b6f3dd994 emit the match table at global scope instead of within the
MatchInstructionImpl. This makes it easier to read/understand
MatchInstructionImpl.

llvm-svn: 113170
2010-09-06 21:08:38 +00:00
Chris Lattner 82d88ced92 special case the mnemonic operand of the instruction in the
generated matcher, emiting it as a column in the MatchEntry
table instead of forcing it to go through classification and
everything else.  Making it be classified caused tblgen to
produce a ton of one-off classes for each mneumonic.  This
should reduce the size of the generated matcher significantly
while paving the way for future improvements.

llvm-svn: 113169
2010-09-06 21:01:37 +00:00
Chris Lattner fdb7decfaf The "ambiguous instructions" check only produces anything with -debug,
so only do the N^2 loop with debug mode.

llvm-svn: 113168
2010-09-06 20:21:47 +00:00
Chris Lattner 31c63fb518 simplify the hacks around jrcxz.
llvm-svn: 113167
2010-09-06 20:10:12 +00:00
Chris Lattner b4be28f33d have tblgen detect when an instruction would have matched, but
failed because a subtarget feature was not enabled.  Use this to
remove a bunch of hacks from the X86AsmParser for rejecting things
like popfl in 64-bit mode.  Previously these hacks weren't needed,
but were important to get a message better than "invalid instruction"
when used in the wrong mode.

This also fixes bugs where pushal would not be rejected correctly in
32-bit mode (just pusha).

llvm-svn: 113166
2010-09-06 20:08:02 +00:00
Chris Lattner a22a368e7c change MatchInstructionImpl to return an enum instead of bool.
llvm-svn: 113165
2010-09-06 19:22:17 +00:00
Chris Lattner 8128ca1c2c add note
llvm-svn: 113164
2010-09-06 19:14:40 +00:00
Chris Lattner 3e4582ada5 have AsmMatcherEmitter.cpp produce the hunk of code that gets included
into the middle of the class, and rework how the different sections of
the generated file are conditionally included for simplicity.

llvm-svn: 113163
2010-09-06 19:11:01 +00:00
Howard Hinnant db3e9975d0 Working the type_traits area: Hooked up to clang's __is_union. Got has_trivial_copy_assign working.
llvm-svn: 113162
2010-09-06 19:10:31 +00:00
Argyrios Kyrtzidis d05f3e3730 Fix a C++ PCH problem which was exposed by r113019. CXXBaseOrMemberInitializer's IsWritten and source order is not set.
llvm-svn: 113161
2010-09-06 19:04:27 +00:00
Eric Christopher b33877b710 Regenerate.
llvm-svn: 113160
2010-09-06 18:47:10 +00:00
Eric Christopher 1243b9df84 Update to 2.9 post-2.8 branch.
llvm-svn: 113159
2010-09-06 18:47:00 +00:00
Roman Divacky e1278b57f9 Redefine LOOP* instructions from I to Ii8PCRel as they take an i8 argument.
llvm-svn: 113158
2010-09-06 18:43:14 +00:00
Chris Lattner 4cfbcdc7b6 random cleanups
llvm-svn: 113157
2010-09-06 18:32:06 +00:00
Chris Lattner d7ff9f91bf remove curly quotes, patch by Dimitry Andric!
llvm-svn: 113156
2010-09-06 17:52:29 +00:00
Benjamin Kramer 3723ba1fe0 MCELF: Align symtab, relocation sections and section headers properly. Patch by Krister Wombell.
llvm-svn: 113155
2010-09-06 16:11:52 +00:00
Argyrios Kyrtzidis 2fdb5b5955 LastFieldBitfield in CGObjCCommonMac::BuildAggrIvarLayout keeps bitfields or unnamed fields but later the code
assumes that it's always a bitfield. This can lead to a crash (reported at rdar://8368320).

llvm-svn: 113154
2010-09-06 12:00:10 +00:00
Zhongxing Xu 33dfc07b00 FinishBlock() is essentially doing nothing except returning '!badCFG'.
llvm-svn: 113149
2010-09-06 07:32:31 +00:00
Zhongxing Xu b1e10aa670 Simplify CFG construction: bail out early when we have a bad CFG.
llvm-svn: 113148
2010-09-06 07:04:06 +00:00
Chris Lattner 963debc109 compute the HasSSE3 bit correctly, patch by Nikolai Saoukh.
llvm-svn: 113147
2010-09-06 05:19:44 +00:00
Chris Lattner be9019090e fix PR8067, an over-aggressive assertion in LICM.
llvm-svn: 113146
2010-09-06 05:11:24 +00:00
Chris Lattner 07b332f0a0 emit the LLVM intrinsic name -> intrinsic number mapping table with
StringMatcher instead of a linear sequence of memcmps.

llvm-svn: 113145
2010-09-06 03:58:45 +00:00
Chris Lattner a58edd1df3 cleanup some of the lifetime/invariant marker stuff, add a big fixme.
llvm-svn: 113144
2010-09-06 03:58:04 +00:00
Chris Lattner 96fe532c67 allow specifying an indentation level for the string matcher.
llvm-svn: 113143
2010-09-06 03:50:59 +00:00
Chris Lattner 497d13e82b emit the __builtin -> intrinsic map with StringMatcher instead of a
copy of a close relative of it.

llvm-svn: 113142
2010-09-06 03:14:45 +00:00
Chris Lattner 6dcaa42540 same bug, another place.
llvm-svn: 113141
2010-09-06 03:12:27 +00:00
Chris Lattner 9bb3bf1b59 fix a critical bug where the generated table would say
"1 strings to match" in a comment, which isn't gramatic.

llvm-svn: 113140
2010-09-06 03:11:10 +00:00
Chris Lattner 69b5913500 update cmake
llvm-svn: 113139
2010-09-06 02:58:25 +00:00
Rafael Espindola b2d0d40c3d Make "-ccc-cxx" option work on Linux.
Patch by nobled.

I also took the opportunity to make the field private since now it is only ready from the
outside.

llvm-svn: 113138
2010-09-06 02:36:23 +00:00
Chris Lattner ca5a3554b5 factor the snazzy string matcher code that Daniel hates
out of AsmMatcherEmitter.cpp into its own class.

llvm-svn: 113137
2010-09-06 02:01:51 +00:00
Chris Lattner fb43da66b5 slightly improve the runtime and code size of the Intrinsics info table by not
comparing the "llvm." prefix in the memcmp, and not storing it in the string literal.

llvm-svn: 113136
2010-09-06 01:44:44 +00:00
Chris Lattner e34c835bde speed up -gvn 3.4% on the testcase in PR7023
llvm-svn: 113135
2010-09-06 01:26:29 +00:00
Chris Lattner b01c24a945 Teach loop rotate to hoist trivially invariant instructions
in the duplicated block instead of duplicating them.  

Duplicating them into the end of the loop and the preheader 
means that we got a phi node in the header of the loop, 
which prevented LICM from hoisting them.  GVN would
usually come around later and merge the duplicated 
instructions so we'd get reasonable output... except that
anything dependent on the shoulda-been-hoisted value can't
be hoisted.  In PR5319 (which this fixes), a memory value
didn't get promoted.

llvm-svn: 113134
2010-09-06 01:10:22 +00:00
Chris Lattner da24b9a49a pull a simple method out of LICM into a new
Loop::hasLoopInvariantOperands method. Remove
a useless and confusing Loop::isLoopInvariant(Instruction)
method, which didn't do what you thought it did.

No functionality change.

llvm-svn: 113133
2010-09-06 01:05:37 +00:00
Eli Friedman 08e3cdcffa Get rid of unnecessary return.
llvm-svn: 113132
2010-09-06 00:31:37 +00:00
Eli Friedman abebebf742 Update test for r113128.
llvm-svn: 113131
2010-09-06 00:30:50 +00:00
Chris Lattner 52bcf96384 move the hackaround for PR6537 to catch unions as well,
fixing the ICE in PR7151

llvm-svn: 113130
2010-09-06 00:13:11 +00:00
Chris Lattner f53c096813 clean up some formatting.
llvm-svn: 113129
2010-09-06 00:11:41 +00:00
Eli Friedman 0b1fbd1394 PR7242: Make sure to use a different context for evaluating constant
initializers, so the result of the evaluation doesn't leak through
inconsistently.  Also, don't evaluate references to variables with
initializers with side-effects.

llvm-svn: 113128
2010-09-06 00:10:32 +00:00
Chris Lattner ee8df8f167 fix PR7192 by defining wchar_t in a more conventional way. The
type of L"x" can change based on command line arguments.

llvm-svn: 113127
2010-09-05 23:29:49 +00:00
Steven Watanabe 2ba828f36d Tell the VS headers that char16_t and char32_t are keywords, so yvals.h doesn't try to define them as typedefs.
llvm-svn: 113126
2010-09-05 23:16:22 +00:00
Chris Lattner f0b0497343 fix 7320: we can't delete a trailing space if it doesn't exist.
llvm-svn: 113125
2010-09-05 23:16:09 +00:00
Eli Friedman 8ed2bac65d PR8023: Don't crash on invalid uses of __real__ on class types in C++.
llvm-svn: 113124
2010-09-05 23:15:52 +00:00
Chris Lattner 7b7768a269 fit in 80 columns and don't crash on exit, fixes PR8080
llvm-svn: 113123
2010-09-05 23:09:30 +00:00
Chris Lattner f43cb302ca remove some dead code. t2addrmode_imm8s4 is never used in a
pattern, so there is no need to define a matching function.

llvm-svn: 113122
2010-09-05 22:51:11 +00:00
Chris Lattner 15bd17e572 fix inconsistent formatting.
llvm-svn: 113121
2010-09-05 22:43:56 +00:00
Chris Lattner accb015f7c cleanups: mark stuff static, only tagdecls should be in anon namespaces.
llvm-svn: 113120
2010-09-05 21:25:43 +00:00
Chris Lattner e40007a71b cleanups.
llvm-svn: 113119
2010-09-05 21:18:45 +00:00
Chris Lattner 8c26cee3f3 some random notes.
llvm-svn: 113118
2010-09-05 20:49:45 +00:00
Chris Lattner 419d0aa0ed add a comment about where this should eventually move.
llvm-svn: 113117
2010-09-05 20:33:40 +00:00