Commit Graph

87232 Commits

Author SHA1 Message Date
Chandler Carruth
5a88dda4be Sort the #include lines for unittest/...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169250 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 10:23:08 +00:00
Chandler Carruth
4ca7e09b7c Sort the #include lines of the examples/... tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169249 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 10:16:57 +00:00
Chandler Carruth
96ad0e8b16 Teach the include sorter to quickly skip files with an extension that
doesn't look like it will have C++ code in it.

Suggestions on a better heuristic are welcome.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169248 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 10:08:59 +00:00
Chandler Carruth
fd025797ea Teach the include sorter to skip files under test trees and under INPUTS
trees. This allows running the input sorter on the entire clang
repository cleanly now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169247 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 09:59:54 +00:00
Chandler Carruth
1ff3d66222 Teach the include sorting script about the gtest headers; sort them with
the system headers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169242 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 09:44:38 +00:00
NAKAMURA Takumi
4cd0a82fbf VMCoreTests/PassManagerTest.cpp: Appease msvc not to do "using llvm::Pass" in class template.
FIXME: I have not checked whether to be compiled on msvc11.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169225 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 07:25:24 +00:00
Chandler Carruth
a1514e24cc Sort includes for all of the .h files under the 'lib' tree. These were
missed in the first pass because the script didn't yet handle include
guards.

Note that the script is now able to handle all of these headers without
manual edits. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169224 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 07:12:27 +00:00
Nadav Rotem
e6f2df9610 Give scalar if-converted blocks half the score because they are not always executed due to CF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169223 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 07:11:52 +00:00
Chandler Carruth
6cb5719689 Address review comments from Matt on the sort_includes.py script.
1) Teach it to handle files with #include on the first line -- these do
   actually exist in LLVM.
2) Support llvm-c and clang-c include projects.
3) Nuke some stail imports.
4) Switch to using os.path to split the file extension off.
5) Remove debugging leftovers.
6) Add docstring (a really puny one) for the sort function.

I'm continuing te avoid stripping the whitespace on the RHS to preserve
whatever newline characters happen to be in the original file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169222 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 07:04:58 +00:00
Chandler Carruth
8a0ff3a265 Add a comment about the requirement that the Windows.h header be last.
This comment has the dual effect of blocking reorderings with the
sort_include script.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169221 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 07:04:57 +00:00
Bill Wendling
a7645a3c66 Add a 'count' field to the DWARF subrange.
The count field is necessary because there isn't a difference between the 'lo'
and 'hi' attributes for a one-element array and a zero-element array. When the
count is '0', we know that this is a zero-element array. When it's >=1, then
it's a normal constant sized array. When it's -1, then the array is unbounded.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169218 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 06:20:49 +00:00
Nadav Rotem
319d594e22 Add the last part that is needed for vectorization of if-converted code.
Added the code that actually performs the if-conversion during vectorization.

We can now vectorize this code:

for (int i=0; i<n; ++i) {
  unsigned k = 0;

  if (a[i] > b[i])   <------ IF inside the loop.
    k = k * 5 + 3;

  a[i] = k;          <---- K is a phi node that becomes vector-select.
}



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169217 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 06:15:11 +00:00
Kostya Serebryany
6c55412ea4 [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
2012-12-04 06:14:01 +00:00
Bill Wendling
69b1e71a3b 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
2012-12-04 06:12:44 +00:00
Matt Beaumont-Gay
ee72115670 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
2012-12-04 05:41:27 +00:00
Jyotsna Verma
3db6676e32 Move all operand definitions into HexagonOperands.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169213 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 05:00:31 +00:00
Jyotsna Verma
3e91da24bc 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
2012-12-04 04:29:16 +00:00
Sean Silva
821c0e4ccf docs: Fix broken link.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169211 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 03:45:27 +00:00
Sean Silva
1bc2bab332 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
2012-12-04 03:30:36 +00:00
Shuxin Yang
bba3eb054a 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
2012-12-04 03:28:32 +00:00
Sean Silva
b715b205a4 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
2012-12-04 03:20:08 +00:00
Alexey Samsonov
f985f44b13 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
2012-12-04 01:34:23 +00:00
Jakub Staszak
f94e8c4caf Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169198 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 01:00:52 +00:00
Manman Ren
69261a6442 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
2012-12-04 00:52:33 +00:00
Jakub Staszak
46608c0f64 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
2012-12-04 00:50:06 +00:00
NAKAMURA Takumi
915584ed13 LoopVectorize.cpp: Suppress a warning. [-Wunused-variable]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169195 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 00:49:34 +00:00
NAKAMURA Takumi
36422d8876 Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169194 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 00:49:28 +00:00
Jakob Stoklund Olesen
f714156460 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
2012-12-04 00:46:13 +00:00
Jakob Stoklund Olesen
46f6fe7a45 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
2012-12-04 00:35:59 +00:00
Jakob Stoklund Olesen
980bddfb1c 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
2012-12-04 00:30:22 +00:00
Manman Ren
dc8126bbb8 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
2012-12-04 00:26:44 +00:00
NAKAMURA Takumi
4af1ca5229 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
2012-12-04 00:08:14 +00:00
Shuxin Yang
c811976b04 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
2012-12-04 00:04:54 +00:00
Jakob Stoklund Olesen
fc6374439e 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
2012-12-03 23:23:50 +00:00
Akira Hatanaka
ade047463f 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
2012-12-03 23:12:19 +00:00
Akira Hatanaka
ff0b2cfa3b 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
2012-12-03 23:11:12 +00:00
Michael Ilseman
cb66b5dd7a Minor tweaking to SmallVector static size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169176 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-03 22:57:47 +00:00
Nadav Rotem
b8f842dce4 minor renaming, documentation and cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169175 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-03 22:57:09 +00:00
Akira Hatanaka
25752e7be7 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
2012-12-03 22:51:22 +00:00
Jakob Stoklund Olesen
fc29db1214 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
2012-12-03 22:51:04 +00:00
Nadav Rotem
e70b2680a8 constify the cost API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169172 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-03 22:47:12 +00:00
Nadav Rotem
fa72ee729a 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
2012-12-03 22:46:31 +00:00
Jakob Stoklund Olesen
303da1baf2 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
2012-12-03 22:35:35 +00:00
Jyotsna Verma
bfeecc1306 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
2012-12-03 22:26:28 +00:00
Michael J. Spencer
6bc86018d1 [Support] Make FileOutputBuffer work on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169167 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-03 22:09:52 +00:00
Michael J. Spencer
604db310f0 [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
2012-12-03 22:09:31 +00:00
Michael J. Spencer
2b8150318d 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
2012-12-03 22:07:00 +00:00
Pedro Artigas
49eb628c21 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
2012-12-03 21:56:57 +00:00
Argyrios Kyrtzidis
f7e78487de Add a getMemorySize() function for DenseSet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169163 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-03 21:46:21 +00:00
Nadav Rotem
56f1ce22dc 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
2012-12-03 21:33:08 +00:00