Kostya Serebryany [Tue, 4 Dec 2012 06:14:01 +0000 (06:14 +0000)]
[asan] add experimental -asan-realign-stack option (true by default, which does not change the current behavior)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169216
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 4 Dec 2012 06:12:44 +0000 (06:12 +0000)]
Add a 'getCount' method to get the number of elements in the subrange.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169215
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Tue, 4 Dec 2012 05:41:27 +0000 (05:41 +0000)]
Add 'using' declarations to suppress -Woverloaded-virtual warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169214
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Tue, 4 Dec 2012 05:00:31 +0000 (05:00 +0000)]
Move all operand definitions into HexagonOperands.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169213
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Tue, 4 Dec 2012 04:29:16 +0000 (04:29 +0000)]
Move generic Hexagon subtarget information into Hexagon.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169212
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Tue, 4 Dec 2012 03:45:27 +0000 (03:45 +0000)]
docs: Fix broken link.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169211
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Tue, 4 Dec 2012 03:30:36 +0000 (03:30 +0000)]
docs: Fix dead link.
Apparently Dinkumware are no longer hosting their nice reference
manuals. Thankfully, `cppreference.com` can fill that role well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169210
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Tue, 4 Dec 2012 03:28:32 +0000 (03:28 +0000)]
rdar://
12329730 (2nd part, revised)
The type of shirt-right (logical or arithemetic) should remain unchanged
when transforming "X << C1 >> C2" into "X << (C1-C2)"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169209
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Tue, 4 Dec 2012 03:20:08 +0000 (03:20 +0000)]
docs: Convert ProgrammersManual to reST.
Patch by Alexander Zinenko!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169208
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 4 Dec 2012 01:34:23 +0000 (01:34 +0000)]
ASan: add initial support for handling llvm.lifetime intrinsics in ASan - emit calls into runtime library that poison memory for local variables when their lifetime is over and unpoison memory when their lifetime begins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169200
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 4 Dec 2012 01:00:52 +0000 (01:00 +0000)]
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169198
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 4 Dec 2012 00:52:33 +0000 (00:52 +0000)]
Stack Alignment: when creating stack objects in MachineFrameInfo, make sure
the alignment is clamped to TargetFrameLowering.getStackAlignment if the target
does not support stack realignment or the option "realign-stack" is off.
This will cause miscompile if the address is treated as aligned and add is
replaced with or in DAGCombine.
Added a bool StackRealignable to TargetFrameLowering to check whether stack
realignment is implemented for the target. Also added a bool RealignOption
to MachineFrameInfo to check whether the option "realign-stack" is on.
rdar://
12713765
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169197
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 4 Dec 2012 00:50:06 +0000 (00:50 +0000)]
Use dyn_cast instead of isa and cast. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169196
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Dec 2012 00:49:34 +0000 (00:49 +0000)]
LoopVectorize.cpp: Suppress a warning. [-Wunused-variable]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169195
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Dec 2012 00:49:28 +0000 (00:49 +0000)]
Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169194
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 4 Dec 2012 00:46:13 +0000 (00:46 +0000)]
Remove the old TRI::ResolveRegAllocHint() and getRawAllocationOrder() hooks.
These functions have been replaced by TRI::getRegAllocationHints() which
provides the same capabilities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169192
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 4 Dec 2012 00:35:59 +0000 (00:35 +0000)]
Remove VirtRegMap::getRegAllocPref().
Now that there can be multiple hint registers from targets, it doesn't
make sense to have a function that returns 'the' preferred register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169190
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 4 Dec 2012 00:30:22 +0000 (00:30 +0000)]
Use MRI::getSimpleHint() instead of getRegAllocPref() in remaining cases.
Targets can provide multiple hints now, so getRegAllocPref() doesn't
make sense any longer because it only returns one preferred register.
Replace it with getSimpleHint() in the remaining heuristics. This
function only
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169188
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 4 Dec 2012 00:26:44 +0000 (00:26 +0000)]
Stack Alignment: move functions from header file MachineFrameInfo.h.
No functional change for this commit. The follow-up patch will add more stuff to
these functions.
rdar://
12713765
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169186
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Dec 2012 00:08:14 +0000 (00:08 +0000)]
RuntimeDyld: Fix up r169178. MSVC doesn't like "or".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169183
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Tue, 4 Dec 2012 00:04:54 +0000 (00:04 +0000)]
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!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169182
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 3 Dec 2012 23:23:50 +0000 (23:23 +0000)]
Add VirtRegMap::hasKnownPreference().
Virtual registers with a known preferred register are prioritized by
RAGreedy. This function makes the condition explicit without depending
on getRegAllocPref().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169179
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 3 Dec 2012 23:12:19 +0000 (23:12 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169178
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 3 Dec 2012 23:11:12 +0000 (23:11 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169177
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Mon, 3 Dec 2012 22:57:47 +0000 (22:57 +0000)]
Minor tweaking to SmallVector static size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169176
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 3 Dec 2012 22:57:09 +0000 (22:57 +0000)]
minor renaming, documentation and cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169175
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 3 Dec 2012 22:51:22 +0000 (22:51 +0000)]
Functions in MipsCodeEmitter.cpp that expand unaligned loads/stores are dead
code. Removing it.
Patch by Petar Jovanovic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169174
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 3 Dec 2012 22:51:04 +0000 (22:51 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169173
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 3 Dec 2012 22:47:12 +0000 (22:47 +0000)]
constify the cost API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169172
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 3 Dec 2012 22:46:31 +0000 (22:46 +0000)]
IF-conversion: teach the cost-model how to grade if-converted loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169171
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 3 Dec 2012 22:35:35 +0000 (22:35 +0000)]
Implement ARMBaseRegisterInfo::getRegAllocationHints().
This provides the same functionality as getRawAllocationOrder() for the
even/odd hints, but without the many constant register arrays.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169169
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Mon, 3 Dec 2012 22:26:28 +0000 (22:26 +0000)]
Define store instructions with base+immediate offset addressing mode
using multiclass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169168
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 3 Dec 2012 22:09:52 +0000 (22:09 +0000)]
[Support] Make FileOutputBuffer work on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169167
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 3 Dec 2012 22:09:31 +0000 (22:09 +0000)]
[Support][FileSystem] Fix open mode in resize_file on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169166
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 3 Dec 2012 22:07:00 +0000 (22:07 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169165
91177308-0d34-0410-b5e6-
96231b3b80d8
Pedro Artigas [Mon, 3 Dec 2012 21:56:57 +0000 (21:56 +0000)]
moves doInitialization and doFinalization to the Pass class and removes some unreachable code in MachineModuleInfo
reviewed by Evan Cheng <evan.cheng@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169164
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 3 Dec 2012 21:46:21 +0000 (21:46 +0000)]
Add a getMemorySize() function for DenseSet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169163
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 3 Dec 2012 21:33:08 +0000 (21:33 +0000)]
Now that we have a basic if-conversion infrastructure we can rename the
"single basic block loop vectorizer" to "innermost loop vectorizer".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169158
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Mon, 3 Dec 2012 21:29:36 +0000 (21:29 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169157
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 3 Dec 2012 21:17:00 +0000 (21:17 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169154
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Mon, 3 Dec 2012 21:13:13 +0000 (21:13 +0000)]
Define load instructions with base+immediate offset addressing mode
using multiclass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169153
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 3 Dec 2012 21:06:35 +0000 (21:06 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169152
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Mon, 3 Dec 2012 20:39:45 +0000 (20:39 +0000)]
Define unsigned const-ext predicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169149
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Mon, 3 Dec 2012 20:14:38 +0000 (20:14 +0000)]
Removing unnecessary 'else' statement from the predicates defined in HexagonOperards.td.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169148
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 3 Dec 2012 19:59:23 +0000 (19:59 +0000)]
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
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169147
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Mon, 3 Dec 2012 19:58:12 +0000 (19:58 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169146
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 3 Dec 2012 19:44:25 +0000 (19:44 +0000)]
Add 'getInt64Field()' method to get the signed integer instead of unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169145
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 3 Dec 2012 19:09:26 +0000 (19:09 +0000)]
ASan: add blacklist file to ASan pass options. Clang patch for this will follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169143
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Mon, 3 Dec 2012 18:45:45 +0000 (18:45 +0000)]
Fix PR12942: Allow two CUs to be generated from the same source file.
Thanks Eric for the review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169142
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 3 Dec 2012 17:34:44 +0000 (17:34 +0000)]
Teach the jump threading optimization to stop scanning the basic block when calculating the cost after passing the threshold.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169135
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 3 Dec 2012 17:31:11 +0000 (17:31 +0000)]
Revert r169039, "Aggregate pass execution time report by pass ID instead of pass instance."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169134
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 3 Dec 2012 17:02:12 +0000 (17:02 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169133
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 3 Dec 2012 17:01:46 +0000 (17:01 +0000)]
Teach the include sorter to not choke on include guards. ;]
Kind of important when prepping the include/... tree version of the sort
changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169132
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 3 Dec 2012 16:50:05 +0000 (16:50 +0000)]
Use the new script to sort the includes of every file under lib.
Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.
Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 3 Dec 2012 16:08:32 +0000 (16:08 +0000)]
clarify that this isn't lld.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169130
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 3 Dec 2012 14:23:44 +0000 (14:23 +0000)]
Add a completely hack-ish tool to sort includes according to the coding
standards.
I am a terrible Python programmer. Patches more the welcome. Please tell
me how this should look if it should look differently. It's just a tiny
little script so it didn't make sense to go through pre-commit review,
especially as someone who actually knows python may want to just rip it
apart and do it The Right Way.
I will be preparing a commit shortly that uses this script to
canonicalize *all* of the #include lines in LLVM. Really, all of them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169125
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 3 Dec 2012 10:59:55 +0000 (10:59 +0000)]
Remove some buggy and apparantly unnecessary code from SROA.
The partitioning logic attempted to handle uses of an alloca with an
offset starting before the alloca so long as the use had some overlap
with the alloca itself. However, there was a bug where we tested
'(uint64_t)Offset >= AllocSize' without first checking whether 'Offset'
was positive. As a consequence, essentially every negative offset (that
is, starting *before* the alloca does) would be thrown out, even if it
was overlapping. The subsequent code to throw out negative offsets which
were actually non-overlapping was essentially dead. The code to *handle*
overlapping negative offsets was actually dead!
I've just removed all of this, and taught SROA to discard any uses which
start prior to the alloca from the beginning. It has the lovely property
of simplifying the code. =] All the tests still pass, and in fact no new
tests are needed as this is already covered by our testsuite. Fixing the
code so that negative offsets work the way the comments indicate they
were supposed to work causes regressions. That's how I found this.
Anyways, this is all progress in the correct direction -- tightening up
SROA to be maximally aggressive. Some day, I really hope to turn
out-of-bounds accesses to an alloca into 'unreachable'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169120
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 3 Dec 2012 10:15:03 +0000 (10:15 +0000)]
fix stats for added checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169119
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Mon, 3 Dec 2012 06:54:50 +0000 (06:54 +0000)]
Define signed const-ext predicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169117
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 3 Dec 2012 06:34:06 +0000 (06:34 +0000)]
Remove 'deplibs' keyword, since it's no longer used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169116
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Mon, 3 Dec 2012 04:10:58 +0000 (04:10 +0000)]
Clean up, bring up-to-date and apply consistent formatting.
This document is a long-time pet peeve :-) More fixes to come.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169115
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 2 Dec 2012 17:14:09 +0000 (17:14 +0000)]
Allow merging multiple store sequences on the same chain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169111
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 2 Dec 2012 16:40:38 +0000 (16:40 +0000)]
Bring vim keyword lists up to date.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169110
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Sun, 2 Dec 2012 16:02:41 +0000 (16:02 +0000)]
Fix a bug in FileCheck that wouldn't let define variables as follows:
; CHECK: [[VAR:[a-z]]]
The problem was that to find the end of the regex var definition, it was
simplistically looking for the next ]] and finding the incorrect one. A
better approach is to count nesting of brackets (taking escaping into
account). This way the brackets that are part of the regex can be discovered
and skipped properly, and the ]] ending is detected in the right place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169109
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Sun, 2 Dec 2012 15:46:02 +0000 (15:46 +0000)]
Fix an invalid regex in the test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169108
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 2 Dec 2012 11:53:27 +0000 (11:53 +0000)]
Simplify the coding standards for #include ordering. The ordering is now
trivially achievable with an editor. I'll likely check in a silly python
script to help with this too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169107
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Sun, 2 Dec 2012 02:47:48 +0000 (02:47 +0000)]
Unbreak Sphinx build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169106
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Sat, 1 Dec 2012 22:21:04 +0000 (22:21 +0000)]
Another fix attempt to Makefile.sphinx - copy the PNGs from tutorial/ as well,
and recursive copying is not required for the tutorial/ directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169105
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Sat, 1 Dec 2012 22:11:59 +0000 (22:11 +0000)]
Attempt to fix Makefile.sphinx to not generate errors while trying to copy
files from tutorial/.svn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169104
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Sat, 1 Dec 2012 22:03:57 +0000 (22:03 +0000)]
Update FileCheck's documentation to mention recently added feature of
matching a variable defined on the same line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169103
91177308-0d34-0410-b5e6-
96231b3b80d8
Gregory Szorc [Sat, 1 Dec 2012 21:57:30 +0000 (21:57 +0000)]
[python] Add markup option to disassembler
Patch contributed by Wladimir J. van der Laan <laanwj@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169102
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Sat, 1 Dec 2012 21:54:48 +0000 (21:54 +0000)]
Support referencing variables defined on the same line.
See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-
20121126/157198.html
and related discussions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169101
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Sat, 1 Dec 2012 14:44:23 +0000 (14:44 +0000)]
Remove bugzilla link.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169091
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Sat, 1 Dec 2012 12:13:48 +0000 (12:13 +0000)]
Documentation: convert WritingAnLLVMBackend.html to reST
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169087
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 1 Dec 2012 12:07:58 +0000 (12:07 +0000)]
Add .arcconfig to the repository. Useful if someone wants to use phabricator's command line tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169085
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 1 Dec 2012 11:53:32 +0000 (11:53 +0000)]
SROA: Avoid struct and array types early to avoid creating an overly large integer type.
Fixes PR14465.
Differential Revision: http://llvm-reviews.chandlerc.com/D148
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169084
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhou Sheng [Sat, 1 Dec 2012 10:54:28 +0000 (10:54 +0000)]
Revert previous check in r168581, r169079 as they are still in code review status.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169083
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhou Sheng [Sat, 1 Dec 2012 04:38:53 +0000 (04:38 +0000)]
The patch is to improve the memory footprint of pass GlobalOpt.
Also check in a case to repeat the issue, on which 'opt -globalopt' consumes 1.6GB memory.
The big memory footprint cause is that current GlobalOpt one by one hoists and stores the leaf element constant into the global array, in each iteration, it recreates the global array initializer constant and leave the old initializer alone. This may result in many obsolete constants left.
For example: we have global array @rom = global [16 x i32] zeroinitializer
After the first element value is hoisted and installed: @rom = global [16 x i32] [ 1, 0, 0, ... ]
After the second element value is installed: @rom = global [16 x 32] [ 1, 2, 0, 0, ... ] // here the previous initializer is obsolete
...
When the transform is done, we have 15 obsolete initializers left useless.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169079
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 1 Dec 2012 02:23:45 +0000 (02:23 +0000)]
VMCore/DebugInfo.cpp: DICompileUnit::getSubprograms(): Check numOperands().
2012-11-30-misched-dbg.ll had crashed. Then (MDNode)N was "!{}".
I am not sure it would be ill-formed or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169074
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 1 Dec 2012 01:38:48 +0000 (01:38 +0000)]
MC/AsmParser: Avoid unnecessary use of SourceMgr::FindBufferForLoc()
- Each macro instantiation introduces a new buffer, and FindBufferForLoc() is
linear, so previously macro instantiation could be N^2 for some pathological
inputs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169073
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 1 Dec 2012 01:22:49 +0000 (01:22 +0000)]
misched: Fix RegisterPressureTracker handling of DebugVals.
Assertion failed: (TopRPTracker.getPos() == RegionBegin && "bad initial Top tracker").
rdar://
12790302.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169072
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 1 Dec 2012 01:22:44 +0000 (01:22 +0000)]
misched: Fix the DAG builder to handle an undef operand at ExitSU.
Assertion failed: (VNI && "No value to read by operand")
rdar://
12790267.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169071
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 1 Dec 2012 01:22:41 +0000 (01:22 +0000)]
misched: Fix LiveInterval update to better handle DebugVal.
Assertion failed: (itr != mi2iMap.end() && "Instruction not found in maps.")
rdar://
12777252.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169070
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 1 Dec 2012 01:22:38 +0000 (01:22 +0000)]
misched: fix RegionBegin when DebugValues get shuffled to the top.
assert (RemainingInstrs == 0 && "Instruction count mismatch!")
rdar://
12776937.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169069
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 1 Dec 2012 01:06:44 +0000 (01:06 +0000)]
Simplify REG_SEQUENCE lowering.
The TwoAddressInstructionPass takes the machine code out of SSA form by
expanding REG_SEQUENCE instructions into copies. It is no longer
necessary to rewrite the registers used by a REG_SEQUENCE instruction
because the new coalescer algorithm can do it now.
REG_SEQUENCE is just converted to a sequence of sub-register copies now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169067
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Sat, 1 Dec 2012 00:42:27 +0000 (00:42 +0000)]
Update the emacs mode to recognize fadd, fsum, fmul, fdiv, frem, fcmp, icmp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169064
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Nov 2012 23:59:06 +0000 (23:59 +0000)]
Add some first skeleton work for the DWARF5 Fission proposal. Emit
part of the compile unit CU and start separating out information into
the various sections that will be pulled out later.
WIP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169061
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 30 Nov 2012 23:53:00 +0000 (23:53 +0000)]
Convert COPY instructions into KILLs if they have implicit defs.
MachineCopyPropagation doesn't understand super-register liveness well
enough to be able to remove implicit defs of super-registers.
This fixes a problem in ARM/2012-01-26-CopyPropKills.ll that is exposed
by an future TwoAddressInstructionPass change. The KILL instructions are
removed before the machine code is emitted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169060
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Nov 2012 23:20:43 +0000 (23:20 +0000)]
Add support for fission attributes/forms/operations -> string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169056
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Fri, 30 Nov 2012 23:18:21 +0000 (23:18 +0000)]
Vim mode updated to recognize fast-math flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169055
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Fri, 30 Nov 2012 23:14:52 +0000 (23:14 +0000)]
Removed redundancy in wording
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169053
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Fri, 30 Nov 2012 23:12:42 +0000 (23:12 +0000)]
Clean up the documentation to have a common description area for fast-math flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169052
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 30 Nov 2012 23:00:25 +0000 (23:00 +0000)]
Be more clear on what parts of code I own.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169050
91177308-0d34-0410-b5e6-
96231b3b80d8
Pedro Artigas [Fri, 30 Nov 2012 22:47:15 +0000 (22:47 +0000)]
reversed the logic of the log2 detection routine to reduce the number of nested ifs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169049
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 30 Nov 2012 22:37:11 +0000 (22:37 +0000)]
minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169048
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 30 Nov 2012 22:27:54 +0000 (22:27 +0000)]
Fix a bug in APFloat.cpp: declare APFloat after fltSemantics it
uses. APFloat::convert() takes the pointer to the fltSemantics
variable, which is later accessed it in ~APFloat() desctructor.
That is, semantics must still be alive at the moment we delete
APFloat.
Found by experimental AddressSanitizer use-after-scope checker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169047
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 30 Nov 2012 22:15:08 +0000 (22:15 +0000)]
Add me as LTO code owner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169046
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 30 Nov 2012 22:08:55 +0000 (22:08 +0000)]
Replace r168930 with a more reasonable patch.
The original patch removed a bunch of code that the SjLjEHPrepare pass placed
into the entry block if all of the landing pads were removed during the
CodeGenPrepare class. The more natural way of doing things is to run the CGP
*before* we run the SjLjEHPrepare pass.
Make it so!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169044
91177308-0d34-0410-b5e6-
96231b3b80d8
Pedro Artigas [Fri, 30 Nov 2012 22:07:05 +0000 (22:07 +0000)]
Addresses many style issues with prior checkin (r169025)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169043
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 30 Nov 2012 21:42:47 +0000 (21:42 +0000)]
Add a -time-compilations=<N> option to llc.
This causes llc to repeat the module compilation N times, making it
possible to get more accurate information from -time-passes when
compiling small modules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169040
91177308-0d34-0410-b5e6-
96231b3b80d8