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
Chris Lattner
5cac0f71ca
update this.
...
llvm-svn: 113116
2010-09-05 20:22:09 +00:00
Chris Lattner
1edf7434cf
more cleanups
...
llvm-svn: 113115
2010-09-05 20:13:07 +00:00
Chris Lattner
e6214557e7
Change lower atomic pass to use IntrinsicInst to simplify it a bit.
...
llvm-svn: 113114
2010-09-05 20:10:47 +00:00
Chris Lattner
05ef361b5e
eliminate some non-obvious casts. UndefValue isa Constant.
...
llvm-svn: 113113
2010-09-05 20:03:09 +00:00
Howard Hinnant
eea166dfd4
Updated current status.
...
llvm-svn: 113110
2010-09-05 17:31:48 +00:00
Chris Lattner
72d283c826
fix PR8063, a crash in globalopt in the malloc analysis code.
...
llvm-svn: 113109
2010-09-05 17:20:46 +00:00
Lang Hames
64a4a13617
Added initialisers for reduction rule counters.
...
llvm-svn: 113108
2010-09-05 13:42:32 +00:00
Nick Lewycky
e3ac69eca3
Fix warning reported by MSVC++ builder.
...
llvm-svn: 113106
2010-09-05 09:11:38 +00:00
Nick Lewycky
f3a07ec394
Switch FnSet to containing the ComparableFunction instead of a pointer to one.
...
This reduces malloc traffic (yay!) and removes MergeFunctionsEqualityInfo.
llvm-svn: 113105
2010-09-05 09:00:32 +00:00
Nick Lewycky
0095937b13
Fix many bugs when merging weak-strong and weak-weak pairs. We now merge all
...
strong functions first to make sure they're the canonical definitions and then
do a second pass looking only for weak functions.
llvm-svn: 113104
2010-09-05 08:22:49 +00:00
Nick Lewycky
1b36b55f89
No functional change. Replace Out << 'a' << 'b' with Out << "ab" and spell
...
David Vandevoorde's name correctly.
llvm-svn: 113103
2010-09-05 03:40:33 +00:00
Chris Lattner
eeba0c73e5
implement rdar://6653118 - fastisel should fold loads where possible.
...
Since mem2reg isn't run at -O0, we get a ton of reloads from the stack,
for example, before, this code:
int foo(int x, int y, int z) {
return x+y+z;
}
used to compile into:
_foo: ## @foo
subq $12, %rsp
movl %edi, 8(%rsp)
movl %esi, 4(%rsp)
movl %edx, (%rsp)
movl 8(%rsp), %edx
movl 4(%rsp), %esi
addl %edx, %esi
movl (%rsp), %edx
addl %esi, %edx
movl %edx, %eax
addq $12, %rsp
ret
Now we produce:
_foo: ## @foo
subq $12, %rsp
movl %edi, 8(%rsp)
movl %esi, 4(%rsp)
movl %edx, (%rsp)
movl 8(%rsp), %edx
addl 4(%rsp), %edx ## Folded load
addl (%rsp), %edx ## Folded load
movl %edx, %eax
addq $12, %rsp
ret
Fewer instructions and less register use = faster compiles.
llvm-svn: 113102
2010-09-05 02:18:34 +00:00
Howard Hinnant
cbf93f3959
sync with N3126
...
llvm-svn: 113101
2010-09-05 01:14:30 +00:00
Howard Hinnant
f9e81f9acb
sync with N3126
...
llvm-svn: 113100
2010-09-05 01:10:45 +00:00
Howard Hinnant
771f325a1f
sync with N3126
...
llvm-svn: 113099
2010-09-05 01:06:34 +00:00
Howard Hinnant
5bed8c6f65
sync with N3126
...
llvm-svn: 113098
2010-09-05 00:57:20 +00:00
Howard Hinnant
e7d99b29be
sync with N3126
...
llvm-svn: 113097
2010-09-05 00:49:04 +00:00
Chris Lattner
938cebc076
"const id<NSFoo> *" instead of "id<NSFoo> const *".
...
I think this wraps up all the legal cases.
llvm-svn: 113096
2010-09-05 00:43:21 +00:00
Chris Lattner
edead1266e
"const id<NSFoo> *" not "id<NSFoo> const*"
...
llvm-svn: 113095
2010-09-05 00:36:44 +00:00
Chris Lattner
7f2c7f4ef3
"const std::vector<int>*" not "std::vector<int> const*"
...
llvm-svn: 113094
2010-09-05 00:27:00 +00:00
Chris Lattner
c4bf372e43
"const _Complex float *" not "_Complex float const *"
...
llvm-svn: 113093
2010-09-05 00:22:25 +00:00
Chris Lattner
24b89469ac
'const std::type_info*' instead of 'std::type_info const*'
...
llvm-svn: 113092
2010-09-05 00:17:29 +00:00
Chris Lattner
9dd55103c1
print "const intptr_t" instead of "intptr_t const"
...
llvm-svn: 113091
2010-09-05 00:07:29 +00:00