Daniel Malea
48947c7bbf
A few more build fixes for gcc 4.6:
...
- use const char* instead of char* as needed in ObjC language runtime plugin
- use int to iterate through enum (operator++ on enum not defined)
- use initializer list instead of inline initialization of const field
llvm-svn: 169185
2012-12-04 00:23:45 +00:00
NAKAMURA Takumi
f97efd978b
RuntimeDyld: Fix up r169178. MSVC doesn't like "or".
...
llvm-svn: 169183
2012-12-04 00:08:14 +00:00
Shuxin Yang
63e999edbf
rdar://12329730 (2nd part)
...
This change tries to simmplify E1 = " X >> C1 << C2" into :
- E2 = "X << (C2 - C1)" if C2 > C1, or
- E2 = "X >> (C1 - C2)" if C1 > C2, or
- E2 = X if C1 == C2.
Reviewed by Nadav. Thanks!
llvm-svn: 169182
2012-12-04 00:04:54 +00:00
NAKAMURA Takumi
55a8d1d1c1
clang/test/Driver/fsanitize-blacklist.c: Mark it as XFAIL:cygming, due to PR12920.
...
llvm-svn: 169180
2012-12-03 23:29:49 +00:00
Jakob Stoklund Olesen
74052b041b
Add VirtRegMap::hasKnownPreference().
...
Virtual registers with a known preferred register are prioritized by
RAGreedy. This function makes the condition explicit without depending
on getRegAllocPref().
llvm-svn: 169179
2012-12-03 23:23:50 +00:00
Akira Hatanaka
a667aade36
Runtime dynamic linker for MCJIT should support MIPS BigEndian architecture.
...
This small change adds support for that. It will make all MCJIT tests pass
in make-check on BigEndian platforms.
Patch by Petar Jovanovic.
llvm-svn: 169178
2012-12-03 23:12:19 +00:00
Akira Hatanaka
4c128509a5
Classic JIT is still being supported by MIPS, along with MCJIT.
...
This change adds endian-awareness to MipsJITInfo and emitWordLE in
MipsCodeEmitter has become emitWord now to support both endianness.
Patch by Petar Jovanovic.
llvm-svn: 169177
2012-12-03 23:11:12 +00:00
Michael Ilseman
979dfbb6a1
Minor tweaking to SmallVector static size.
...
llvm-svn: 169176
2012-12-03 22:57:47 +00:00
Nadav Rotem
d479a57f68
minor renaming, documentation and cleanups.
...
llvm-svn: 169175
2012-12-03 22:57:09 +00:00
Akira Hatanaka
60c2837e8d
Functions in MipsCodeEmitter.cpp that expand unaligned loads/stores are dead
...
code. Removing it.
Patch by Petar Jovanovic.
llvm-svn: 169174
2012-12-03 22:51:22 +00:00
Jakob Stoklund Olesen
c784a1f906
Use the new getRegAllocationHints() hook from AllocationOrder.
...
This simplifies the hinting code quite a bit while making the targets
easier to write at the same time.
llvm-svn: 169173
2012-12-03 22:51:04 +00:00
Nadav Rotem
ce5db0fa3f
constify the cost API
...
llvm-svn: 169172
2012-12-03 22:47:12 +00:00
Nadav Rotem
fad16be973
IF-conversion: teach the cost-model how to grade if-converted loops.
...
llvm-svn: 169171
2012-12-03 22:46:31 +00:00
Richard Smith
78f6b03edc
Fix test failure when building Clang with g++4.7 -- don't use a Twine temporary
...
after its lifetime has ended!
llvm-svn: 169170
2012-12-03 22:39:14 +00:00
Jakob Stoklund Olesen
742f201e30
Implement ARMBaseRegisterInfo::getRegAllocationHints().
...
This provides the same functionality as getRawAllocationOrder() for the
even/odd hints, but without the many constant register arrays.
llvm-svn: 169169
2012-12-03 22:35:35 +00:00
Jyotsna Verma
6f3bd03e50
Define store instructions with base+immediate offset addressing mode
...
using multiclass.
llvm-svn: 169168
2012-12-03 22:26:28 +00:00
Michael J. Spencer
7fe24f5744
[Support] Make FileOutputBuffer work on Windows.
...
llvm-svn: 169167
2012-12-03 22:09:52 +00:00
Michael J. Spencer
20abb2027f
[Support][FileSystem] Fix open mode in resize_file on Windows.
...
llvm-svn: 169166
2012-12-03 22:09:31 +00:00
Michael J. Spencer
1ad8dff4bf
Revert the header sort on this file.
...
"Windows.h" includes <Windows.h> which defines a bunch of stuff it shouldn't
(even with all the restriction macros). We have no control over this file, so
make it's scope as small as possible.
llvm-svn: 169165
2012-12-03 22:07:00 +00:00
Pedro Artigas
e4348b0412
moves doInitialization and doFinalization to the Pass class and removes some unreachable code in MachineModuleInfo
...
reviewed by Evan Cheng <evan.cheng@apple.com>
llvm-svn: 169164
2012-12-03 21:56:57 +00:00
Argyrios Kyrtzidis
8c114534ff
Add a getMemorySize() function for DenseSet.
...
llvm-svn: 169163
2012-12-03 21:46:21 +00:00
Sebastian Pop
a267d9b829
adapt cloog codegen testcases to isl
...
llvm-svn: 169161
2012-12-03 21:34:09 +00:00
Sebastian Pop
47987128b6
use -polly-ast instead of -polly-cloog
...
llvm-svn: 169160
2012-12-03 21:33:55 +00:00
Sebastian Pop
b08a52898a
execute cloog specific testcases only with CLOOG_FOUND
...
llvm-svn: 169159
2012-12-03 21:33:40 +00:00
Nadav Rotem
eee203d885
Now that we have a basic if-conversion infrastructure we can rename the
...
"single basic block loop vectorizer" to "innermost loop vectorizer".
llvm-svn: 169158
2012-12-03 21:33:08 +00:00
Michael Ilseman
e26658d372
Since this SmallVector immediately grows on the next line, don't waste stack space. SmallVector is still needed due to existing APIs growing their arguments
...
llvm-svn: 169157
2012-12-03 21:29:36 +00:00
Sean Callanan
811209be11
Fixed a crash in which we examined the extension of
...
a file name, whether the file name had an extension
or not.
<rdar://problem/12793152>
llvm-svn: 169156
2012-12-03 21:28:37 +00:00
Alexander Potapenko
e2b6d08459
Use a struct to hold the /proc/self/maps buffer on Linux.
...
llvm-svn: 169155
2012-12-03 21:21:22 +00:00
Jakob Stoklund Olesen
499cac486a
Add a new hook for providing register allocator hints more flexibly.
...
The TargetRegisterInfo::getRegAllocationHints() function is going to
replace the existing mechanisms for providing target-dependent hints to
the register allocator: ResolveRegAllocHint() and
getRawAllocationOrder().
The new hook is more flexible because it allows the target to provide
multiple preferred candidate registers for each virtual register, and it
is easier to use because targets are not required to return a reference
to a constant array like getRawAllocationOrder().
An optional VirtRegMap argument can be used to provide target-dependent
hints that depend on the provisional assignments of other virtual
registers.
llvm-svn: 169154
2012-12-03 21:17:00 +00:00
Jyotsna Verma
4d8686cc42
Define load instructions with base+immediate offset addressing mode
...
using multiclass.
llvm-svn: 169153
2012-12-03 21:13:13 +00:00
Nadav Rotem
a30aba7a01
Add initial support for IF-conversion. This patch implements the first 1/3,
...
which is the legality of the if-conversion transformation. The next step is to
implement the cost-model for the if-converted code as well as the
vectorization itself.
llvm-svn: 169152
2012-12-03 21:06:35 +00:00
Manuel Klimek
6a5619d12e
Fixes a compile warning and crash in the tests.
...
The necessity of this fix points to a problem with the design
of the addToken during the optimiation phase, which we need to address
in a much more principled way.
llvm-svn: 169151
2012-12-03 20:55:42 +00:00
Tobias Grosser
e50df53625
Update CLooG
...
This cloog versions passes all tests with isl 0.11.
llvm-svn: 169150
2012-12-03 20:47:57 +00:00
Jyotsna Verma
c86b3e1b26
Define unsigned const-ext predicates.
...
llvm-svn: 169149
2012-12-03 20:39:45 +00:00
Jyotsna Verma
6aba56e9d4
Removing unnecessary 'else' statement from the predicates defined in HexagonOperards.td.
...
llvm-svn: 169148
2012-12-03 20:14:38 +00:00
Argyrios Kyrtzidis
479d37ed63
Eliminate redundant bitwise operations when using a llvm/ADT/PointerUnion.
...
For comparison, with this code sample:
PointerUnion<int *, char *> Data;
PointerUnion<int *, char *> foo1() {
Data = new int;
return new int;
}
PointerUnion<int *, char *> foo2() {
Data = new char;
return new char;
}
Before this patch we would get:
define i64 @_Z4foo1v() uwtable ssp {
%1 = tail call noalias i8* @_Znwm(i64 4)
%2 = ptrtoint i8* %1 to i64
%3 = load i64* getelementptr inbounds (%"class.llvm::PointerUnion"* @Data , i64 0, i32 0, i32 0), align 8
%4 = and i64 %3, 1
%.masked.i = and i64 %2, -3
%5 = or i64 %4, %.masked.i
store i64 %5, i64* getelementptr inbounds (%"class.llvm::PointerUnion"* @Data , i64 0, i32 0, i32 0), align 8
%6 = tail call noalias i8* @_Znwm(i64 4)
%7 = ptrtoint i8* %6 to i64
%8 = and i64 %7, -3
ret i64 %8
}
define i64 @_Z4foo2v() uwtable ssp {
%1 = tail call noalias i8* @_Znwm(i64 1)
%2 = ptrtoint i8* %1 to i64
%3 = load i64* getelementptr inbounds (%"class.llvm::PointerUnion"* @Data , i64 0, i32 0, i32 0), align 8
%4 = and i64 %3, 1
%5 = or i64 %2, %4
%6 = or i64 %5, 2
store i64 %6, i64* getelementptr inbounds (%"class.llvm::PointerUnion"* @Data , i64 0, i32 0, i32 0), align 8
%7 = tail call noalias i8* @_Znwm(i64 1)
%8 = ptrtoint i8* %7 to i64
%9 = or i64 %8, 2
ret i64 %9
}
After the patch:
define i64 @_Z4foo1v() uwtable ssp {
%1 = tail call noalias i8* @_Znwm(i64 4)
%2 = ptrtoint i8* %1 to i64
store i64 %2, i64* getelementptr inbounds (%"class.llvm::PointerUnion"* @Data , i64 0, i32 0, i32 0), align 8
%3 = tail call noalias i8* @_Znwm(i64 4)
%4 = ptrtoint i8* %3 to i64
ret i64 %4
}
declare noalias i8* @_Znwm(i64)
define i64 @_Z4foo2v() uwtable ssp {
%1 = tail call noalias i8* @_Znwm(i64 1)
%2 = ptrtoint i8* %1 to i64
%3 = or i64 %2, 2
store i64 %3, i64* getelementptr inbounds (%"class.llvm::PointerUnion"* @Data , i64 0, i32 0, i32 0), align 8
%4 = tail call noalias i8* @_Znwm(i64 1)
%5 = ptrtoint i8* %4 to i64
%6 = or i64 %5, 2
ret i64 %6
}
llvm-svn: 169147
2012-12-03 19:59:23 +00:00
Eli Bendersky
5d7b117f44
Simplify this test a bit because DWARF emission/dumping on some platforms
...
is not yet good enough for more sophistication. The important goal of this
test is to make sure llc doesn't crash on this IR like it used to.
llvm-svn: 169146
2012-12-03 19:58:12 +00:00
Bill Wendling
7b246c3872
Add 'getInt64Field()' method to get the signed integer instead of unsigned.
...
llvm-svn: 169145
2012-12-03 19:44:25 +00:00
Alexey Samsonov
9ab73626fc
Add Clang flags -fsanitize-blacklist and -fno-sanitize-blacklist. Make this flag usable for ASan. Blacklisting can be used to disable sanitizer checks for particular file/function/object.
...
llvm-svn: 169144
2012-12-03 19:12:58 +00:00
Alexey Samsonov
ef51c3ff81
ASan: add blacklist file to ASan pass options. Clang patch for this will follow.
...
llvm-svn: 169143
2012-12-03 19:09:26 +00:00
Eli Bendersky
b42d1466a0
Fix PR12942: Allow two CUs to be generated from the same source file.
...
Thanks Eric for the review.
llvm-svn: 169142
2012-12-03 18:45:45 +00:00
Kostya Serebryany
214b715061
[asan] two more bits for __sparc__
...
llvm-svn: 169141
2012-12-03 18:39:21 +00:00
Greg Clayton
f74c4034dd
Fix clang build issues.
...
llvm-svn: 169140
2012-12-03 18:29:55 +00:00
Benjamin Kramer
12fa8fe8b4
libclangFormat is not libclangTooling, but it depends on it.
...
llvm-svn: 169139
2012-12-03 18:28:52 +00:00
Alexey Samsonov
9c1b9f60ad
Fix PR14474: don't emit debug info for interface types in -gline-tables-only mode.
...
llvm-svn: 169138
2012-12-03 18:28:12 +00:00
Daniel Jasper
f793511579
Initial version of formatting library.
...
This formatting library will be used by a stand-alone clang-format tool
and can also be used when writing other refactorings.
Manuel's original design document:
https://docs.google.com/a/google.com/document/d/1gpckL2U_6QuU9YW2L1ABsc4Fcogn5UngKk7fE5dDOoA/edit
The library can already successfully format itself.
Review: http://llvm-reviews.chandlerc.com/D80
llvm-svn: 169137
2012-12-03 18:12:45 +00:00
Greg Clayton
2ed1c0922c
<rdar://problem/12742973>
...
Forwarding a fix for a crasher in the demangler.
llvm-svn: 169136
2012-12-03 17:50:07 +00:00
Nadav Rotem
2349531def
Teach the jump threading optimization to stop scanning the basic block when calculating the cost after passing the threshold.
...
llvm-svn: 169135
2012-12-03 17:34:44 +00:00
Jakob Stoklund Olesen
4c2094be3c
Revert r169039, "Aggregate pass execution time report by pass ID instead of pass instance."
...
llvm-svn: 169134
2012-12-03 17:31:11 +00:00
Chandler Carruth
a79a28b7a8
Sort the #include lines for the include/... tree with the script.
...
AKA: Recompile *ALL* the source code!
This one went much better. No manual edits here. I spot-checked for
silliness and grep-checked for really broken edits and everything seemed
good. It all still compiles. Yell if you see something that looks goofy.
llvm-svn: 169133
2012-12-03 17:02:12 +00:00