oota-llvm.git
10 years agoSplit byval argument initialization so the memcpy(s) are injected at the
Julien Lerouge [Tue, 15 Apr 2014 18:01:54 +0000 (18:01 +0000)]
Split byval argument initialization so the memcpy(s) are injected at the
beginning of the first new block after inlining.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206307 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoLTO: Add more loop simplification passes to LTO
Duncan P. N. Exon Smith [Tue, 15 Apr 2014 17:48:15 +0000 (17:48 +0000)]
LTO: Add more loop simplification passes to LTO

Similar to r202051, add missing loop simplification passes to the LTO
optimization pipeline.

Patch by Rafael Espindola.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206306 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoverify-di: Add back braces for MSVC compatability
Duncan P. N. Exon Smith [Tue, 15 Apr 2014 17:28:26 +0000 (17:28 +0000)]
verify-di: Add back braces for MSVC compatability

Fixup after r206300.

<rdar://problem/15500563>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206305 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoverify-di: Implement DebugInfoVerifier
Duncan P. N. Exon Smith [Tue, 15 Apr 2014 16:27:38 +0000 (16:27 +0000)]
verify-di: Implement DebugInfoVerifier

Implement DebugInfoVerifier, which steals verification relying on
DebugInfoFinder from Verifier.

  - Adds LegacyDebugInfoVerifierPassPass, a ModulePass which wraps
    DebugInfoVerifier.  Uses -verify-di command-line flag.

  - Change verifyModule() to invoke DebugInfoVerifier as well as
    Verifier.

  - Add a call to createDebugInfoVerifierPass() wherever there was a
    call to createVerifierPass().

This implementation as a module pass should sidestep efficiency issues,
allowing us to turn debug info verification back on.

<rdar://problem/15500563>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206300 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoverify-di: split out VerifierSupport
Duncan P. N. Exon Smith [Tue, 15 Apr 2014 16:27:32 +0000 (16:27 +0000)]
verify-di: split out VerifierSupport

Split out assertion and output helpers from Verifier in preparation for
writing the DebugInfoVerifier.

<rdar://problem/15500563>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206299 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse unique_ptr to manage PassInfo instances in the PassRegistry
David Blaikie [Tue, 15 Apr 2014 15:17:14 +0000 (15:17 +0000)]
Use unique_ptr to manage PassInfo instances in the PassRegistry

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206297 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMipsAsmParser.cpp: Fix vg_leak in MipsOperand::CreateMem(). Mem.Base is managed by...
NAKAMURA Takumi [Tue, 15 Apr 2014 14:13:21 +0000 (14:13 +0000)]
MipsAsmParser.cpp: Fix vg_leak in MipsOperand::CreateMem(). Mem.Base is managed by k_Memory itself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206293 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMipsAsmParser::ParseRegister(): Be responsible to delete an Operand on a temporary...
NAKAMURA Takumi [Tue, 15 Apr 2014 14:06:27 +0000 (14:06 +0000)]
MipsAsmParser::ParseRegister(): Be responsible to delete an Operand on a temporary Operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206292 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64/ARM64: enable more AArch64 tests on ARM64.
Tim Northover [Tue, 15 Apr 2014 14:00:29 +0000 (14:00 +0000)]
AArch64/ARM64: enable more AArch64 tests on ARM64.

No code changes for this bunch, just some test rejigs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206291 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64/ARM64: add missing pattern for extending load.
Tim Northover [Tue, 15 Apr 2014 14:00:19 +0000 (14:00 +0000)]
AArch64/ARM64: add missing pattern for extending load.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206290 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64/ARM64: only mangle MOVZ/MOVN during encoding when needed
Tim Northover [Tue, 15 Apr 2014 14:00:15 +0000 (14:00 +0000)]
AArch64/ARM64: only mangle MOVZ/MOVN during encoding when needed

Sometimes we need emit the bits that would actually be a MOVN when producing a
relocated MOVZ instruction (don't ask). But not always, a check which ARM64 got
wrong until now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206289 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64/ARM64: add support for large code-model jump tables.
Tim Northover [Tue, 15 Apr 2014 14:00:11 +0000 (14:00 +0000)]
AArch64/ARM64: add support for large code-model jump tables.

I've left the MachO CodeGen as it is, there's a reasonable chance it should use
the GOT like ConstPools, but I'm not certain.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206288 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64/ARM64: add patterns for various commutations of FNMADD.
Tim Northover [Tue, 15 Apr 2014 14:00:06 +0000 (14:00 +0000)]
AArch64/ARM64: add patterns for various commutations of FNMADD.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206287 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64/ARM64: add half as a storage type on ARM64.
Tim Northover [Tue, 15 Apr 2014 14:00:03 +0000 (14:00 +0000)]
AArch64/ARM64: add half as a storage type on ARM64.

This brings it into line with the AArch64 behaviour and should open the way for
certain OpenCL features.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206286 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64/ARM64: copy patterns for fixed-point conversions
Tim Northover [Tue, 15 Apr 2014 13:59:57 +0000 (13:59 +0000)]
AArch64/ARM64: copy patterns for fixed-point conversions

Code is mostly copied directly across, with a slight extension of the
ISelDAGToDAG function so that it can cope with the floating-point constants
being behind a litpool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206285 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM64: add constraints to various FastISel operations
Tim Northover [Tue, 15 Apr 2014 13:59:53 +0000 (13:59 +0000)]
ARM64: add constraints to various FastISel operations

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206284 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFastISel: constrain the RegClass of operands when emitting instructions.
Tim Northover [Tue, 15 Apr 2014 13:59:49 +0000 (13:59 +0000)]
FastISel: constrain the RegClass of operands when emitting instructions.

ARM64 suffered multiple -verify-machineinstr failures (principally over the
xsp/xzr issue) because FastISel was completely ignoring which subset of the
general-purpose registers each instruction required.

More fixes are coming in ARM64 specific FastISel, but this should cover the
generic problems.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206283 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64/ARM64: add more arm64 lines to AArch64 regression tests
Tim Northover [Tue, 15 Apr 2014 13:59:44 +0000 (13:59 +0000)]
AArch64/ARM64: add more arm64 lines to AArch64 regression tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206282 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64/ARM64: add dp tests from AArch64
Tim Northover [Tue, 15 Apr 2014 13:59:40 +0000 (13:59 +0000)]
AArch64/ARM64: add dp tests from AArch64

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206281 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM64AsmParser.cpp: Fix vg_leak in MC/ARM64/fp-encoding.s.
NAKAMURA Takumi [Tue, 15 Apr 2014 13:22:11 +0000 (13:22 +0000)]
ARM64AsmParser.cpp: Fix vg_leak in MC/ARM64/fp-encoding.s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206279 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoOptional hash symbol feature support for ARM64
Stepan Dyatkovskiy [Tue, 15 Apr 2014 11:43:09 +0000 (11:43 +0000)]
Optional hash symbol feature support for ARM64
http://reviews.llvm.org/D3328

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206276 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCurrent definition of subtract with immediate instruction aliases uses CodeGenOnly...
Vladimir Medic [Tue, 15 Apr 2014 10:14:49 +0000 (10:14 +0000)]
Current definition of subtract with immediate instruction aliases uses CodeGenOnly defined instructions and post matcher expansion methods to emit real instructions add with immediate. However, they can directly alias add with immediate instruction and remove unnecessary definitions and code in MipsAsmParser.cpp. This patch makes no change in functionality, just removes unnecessary definitions and code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206272 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agovect.omp.persistence.ll REQUIRES asserts due to -debug-only.
NAKAMURA Takumi [Tue, 15 Apr 2014 10:12:47 +0000 (10:12 +0000)]
vect.omp.persistence.ll REQUIRES asserts due to -debug-only.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206271 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Allocator] Finally, finish nuking the redundant code that led me here
Chandler Carruth [Tue, 15 Apr 2014 09:44:09 +0000 (09:44 +0000)]
[Allocator] Finally, finish nuking the redundant code that led me here
by removing the MallocSlabAllocator entirely and just using
MallocAllocator directly. This makes all off these allocators expose and
utilize the same core interface.

The only ugly part of this is that it exposes the fact that the JIT
allocator has no real handling of alignment, any more than the malloc
allocator does. =/ It would be nice to fix both of these to support
alignments, and then to leverage that in the BumpPtrAllocator to do less
over allocation in order to manually align pointers. But, that's another
patch for another day. This patch has no functional impact, it just
removes the somewhat meaningless wrapper around MallocAllocator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206267 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoD3348 - [BUG] "Rotate Loop" pass kills "llvm.vectorizer.enable" metadata
Alexey Bataev [Tue, 15 Apr 2014 09:37:30 +0000 (09:37 +0000)]
D3348 - [BUG] "Rotate Loop" pass kills "llvm.vectorizer.enable" metadata

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206266 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Allocator] Pass the size to the deallocation function. This, on some
Chandler Carruth [Tue, 15 Apr 2014 08:59:52 +0000 (08:59 +0000)]
[Allocator] Pass the size to the deallocation function. This, on some
allocation libraries, may allow more efficient allocation and
deallocation. It at least makes the interface implementable by the JIT
memory manager.

However, this highlights problematic overloading between the void* and
the T* deallocation functions. I'm looking into a better way to do this,
but as it happens, it comes up rarely in the codebase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206265 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoX86JITInfo: [x86] Rework r206240, X86CompilationCallback_SSE() should be called for...
NAKAMURA Takumi [Tue, 15 Apr 2014 08:28:23 +0000 (08:28 +0000)]
X86JITInfo: [x86] Rework r206240, X86CompilationCallback_SSE() should be called for SSE-enabled code generator, even if LLVM is not built with -msse.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206261 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Allocator] Fix r206256 which got the enabling case backwards on these
Chandler Carruth [Tue, 15 Apr 2014 08:14:48 +0000 (08:14 +0000)]
[Allocator] Fix r206256 which got the enabling case backwards on these
overloads. This doesn't matter *that* much yet, but it will in
a subsequent patch. I had tested the original pattern, but not my
attempt to pacify MSVC. This at least appears to work. Still fixing the
rest of the fallout in the final patch that uses these overloads, but it
will follow shortly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206259 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix broken build of llvm using clang.
Nick Lewycky [Tue, 15 Apr 2014 08:10:46 +0000 (08:10 +0000)]
Fix broken build of llvm using clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206257 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Allocator] MSVC apparantly has broken SFINAE context handling of
Chandler Carruth [Tue, 15 Apr 2014 08:02:29 +0000 (08:02 +0000)]
[Allocator] MSVC apparantly has broken SFINAE context handling of
'sizeof(T)' for T == void and produces a hard error. I cannot fathom why
this is OK. Oh well. switch to an explicit test for being the
(potentially qualified) void type, which is the only specific case I was
worried about. Hopefully this survives the libstdc++ build bots which
have limited type traits implementations...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206256 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoBreak PseudoSourceValue out of the Value hierarchy. It is now the root of its own...
Nick Lewycky [Tue, 15 Apr 2014 07:22:52 +0000 (07:22 +0000)]
Break PseudoSourceValue out of the Value hierarchy. It is now the root of its own tree containing FixedStackPseudoSourceValue (which you can use isa/dyn_cast on) and MipsCallEntry (which you can't). Anything that needs to use either a PseudoSourceValue* and Value* is strongly encouraged to use a MachinePointerInfo instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206255 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead...
Craig Topper [Tue, 15 Apr 2014 07:20:03 +0000 (07:20 +0000)]
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206254 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd a DenseMapInfo specialization for PointerUnion. In tree user to land shortly.
Nick Lewycky [Tue, 15 Apr 2014 07:08:40 +0000 (07:08 +0000)]
Add a DenseMapInfo specialization for PointerUnion. In tree user to land shortly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206253 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead...
Craig Topper [Tue, 15 Apr 2014 06:32:26 +0000 (06:32 +0000)]
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206252 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Allocator] Constrain the Deallocate templated overloads to only apply
Chandler Carruth [Tue, 15 Apr 2014 06:29:04 +0000 (06:29 +0000)]
[Allocator] Constrain the Deallocate templated overloads to only apply
to types which we can compute the size of. The comparison with zero
isn't actually interesting here, it's mostly about putting sizeof into
a sfinae context.

This is particular important for Deallocate as otherwise the void*
overload can quickly become ambiguous.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206251 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse unique_ptr to manage TypePromotionActions owned by TypePromotionTransaction.
David Blaikie [Tue, 15 Apr 2014 06:17:44 +0000 (06:17 +0000)]
Use unique_ptr to manage TypePromotionActions owned by TypePromotionTransaction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206250 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse unique_ptr to manage ownership of GCFunctionInfos in GCStrategy
David Blaikie [Tue, 15 Apr 2014 06:07:26 +0000 (06:07 +0000)]
Use unique_ptr to manage ownership of GCFunctionInfos in GCStrategy

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206249 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse unique_ptr for the result of Registry entries.
David Blaikie [Tue, 15 Apr 2014 05:53:26 +0000 (05:53 +0000)]
Use unique_ptr for the result of Registry entries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206248 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse unique_ptr to manage ownership of GCStrategy objects in GCMetadata
David Blaikie [Tue, 15 Apr 2014 05:34:49 +0000 (05:34 +0000)]
Use unique_ptr to manage ownership of GCStrategy objects in GCMetadata

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206246 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse unique_ptr for section/segment ownership in WinCOFFObjectWriter
David Blaikie [Tue, 15 Apr 2014 05:25:03 +0000 (05:25 +0000)]
Use unique_ptr for section/segment ownership in WinCOFFObjectWriter

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206245 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse unique_ptr to own MCFunctions within MCModule.
David Blaikie [Tue, 15 Apr 2014 05:15:19 +0000 (05:15 +0000)]
Use unique_ptr to own MCFunctions within MCModule.

MCModule's ctor had to be moved out of line so the definition of
MCFunction was available. (ctor requires the dtor of members (in case
the ctor throws) which required access to the dtor of MCFunction)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206244 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead...
Craig Topper [Tue, 15 Apr 2014 04:59:12 +0000 (04:59 +0000)]
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206243 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse std::unique_ptr to manage MCBasicBlocks in MCFunction.
David Blaikie [Tue, 15 Apr 2014 04:56:29 +0000 (04:56 +0000)]
Use std::unique_ptr to manage MCBasicBlocks in MCFunction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206242 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[MC] Require an MCContext when constructing an MCDisassembler.
Lang Hames [Tue, 15 Apr 2014 04:40:56 +0000 (04:40 +0000)]
[MC] Require an MCContext when constructing an MCDisassembler.

This patch re-introduces the MCContext member that was removed from
MCDisassembler in r206063, and requires that an MCContext be passed in at
MCDisassembler construction time. (Previously the MCContext member had been
initialized in an ad-hoc fashion after construction). The MCCContext member
can be used by MCDisassembler sub-classes to construct constant or
target-specific MCExprs.

This patch updates disassemblers for in-tree targets, and provides the
MCRegisterInfo instance that some disassemblers were using through the
MCContext (previously those backends were constructing their own
MCRegisterInfo instances).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206241 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoX86JITInfo: [x86] Use X86CompilationCallback_SSE() along;
NAKAMURA Takumi [Tue, 15 Apr 2014 04:12:21 +0000 (04:12 +0000)]
X86JITInfo: [x86] Use X86CompilationCallback_SSE() along;

  *not* Subtarget->hasSSE1()
  *but* __SSE__, the flag that LLVM libraries are compiled

The callback calls internal LLVM JIT libraries. It may be built with -msse (or above).

FIXME: JIT may use "host" instead of "generic" by default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206240 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ARM64,C++11]: Range'ify the dead-register-definition pass.
Jim Grosbach [Tue, 15 Apr 2014 02:14:09 +0000 (02:14 +0000)]
[ARM64,C++11]: Range'ify the dead-register-definition pass.

Range-based for loops. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206239 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd iterator_range for MachineInstr defs.
Jim Grosbach [Tue, 15 Apr 2014 02:14:06 +0000 (02:14 +0000)]
Add iterator_range for MachineInstr defs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206238 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[MC] Emit an error if cfi_startproc is used before a symbol is defined.
Quentin Colombet [Tue, 15 Apr 2014 01:17:45 +0000 (01:17 +0000)]
[MC] Emit an error if cfi_startproc is used before a symbol is defined.
Currently, we bind those directives with the last symbol, so if none
has been defined, this would lead to a crash of the compiler.

<rdar://problem/15939159>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206236 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Register Coalescer] Add a test case for 206060.
Quentin Colombet [Tue, 15 Apr 2014 01:15:32 +0000 (01:15 +0000)]
[Register Coalescer] Add a test case for 206060.

<rdar://problem/16582185>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206235 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Allocator] Add Deallocate support to the AllocatorBase CRTP class,
Chandler Carruth [Tue, 15 Apr 2014 00:47:47 +0000 (00:47 +0000)]
[Allocator] Add Deallocate support to the AllocatorBase CRTP class,
along with templated overloads much like we have for Allocate. These
will facilitate switching the Deallocate interface of all the Allocator
classes to accept the size by pre-filling it from the type size where we
can do so. I plan to convert several uses to the template variants in
subsequent patches prior to adding the Size parameter.

No functionality changed, WIP.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206230 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ARM64][MC] Set the default CPU string to generic.
Quentin Colombet [Tue, 15 Apr 2014 00:28:39 +0000 (00:28 +0000)]
[ARM64][MC] Set the default CPU string to generic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206228 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Allocator] Hack around the fact that GCC can't compile the
Chandler Carruth [Tue, 15 Apr 2014 00:22:53 +0000 (00:22 +0000)]
[Allocator] Hack around the fact that GCC can't compile the
static_assert added in r206225. I'm looking into a proper fix, but
wanted the bots back.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206226 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Allocator] Factor the Allocate template overloads into a base class
Chandler Carruth [Tue, 15 Apr 2014 00:19:41 +0000 (00:19 +0000)]
[Allocator] Factor the Allocate template overloads into a base class
rather than defining them (differently!) in both allocators. This also
serves as a basis for documenting and even enforcing some of the
LLVM-style "allocator" concept methods which must exist with various
signatures.

I plan on extending and changing the signatures of these to further
simplify our allocator model in subsequent commits, so I wanted to
factor things as best as I could first. Notably, I'm working to add the
'Size' to the deallocation method of all allocators. This has several
implications not the least of which are faster deallocation times on
certain allocation libraries (tcmalloc). It also will allow the JIT
allocator to fully model the existing allocation interfaces and allow
sanitizer poisoning of deallocated regions. The list of advantages goes
on. =] But by factoring things first I'll be able to make this easier by
first introducing template helpers for the deallocation path.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206225 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse std::unique_ptr for DIE children
David Blaikie [Mon, 14 Apr 2014 22:45:02 +0000 (22:45 +0000)]
Use std::unique_ptr for DIE children

Got bored, removed some manual memory management.

Pushed references (rather than pointers) through a few APIs rather than
replacing *x with x.get().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206222 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoX86: Nuke one more CPU autodetect blurb.
Jim Grosbach [Mon, 14 Apr 2014 22:23:30 +0000 (22:23 +0000)]
X86: Nuke one more CPU autodetect blurb.

Missed one in r206094. This brings MC and TargetMachine back into sync.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206220 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoChange argument order and add explanatory comment to r206130
David Blaikie [Mon, 14 Apr 2014 22:23:06 +0000 (22:23 +0000)]
Change argument order and add explanatory comment to r206130

Changes requested in code review by Eric Christopher of r206130.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206219 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse FrameSetup on frame instructions for the Mips port.
Eric Christopher [Mon, 14 Apr 2014 22:21:22 +0000 (22:21 +0000)]
Use FrameSetup on frame instructions for the Mips port.

I can't seem to get a testcase to show a difference here, but it's
part of the unconditional-br.ll line table weirdness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206218 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[CMake] Reformat, if(MSVC)...else()...endif()
NAKAMURA Takumi [Mon, 14 Apr 2014 21:58:19 +0000 (21:58 +0000)]
[CMake] Reformat, if(MSVC)...else()...endif()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206215 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert "Revert r206045, "Fix shift by constants for vector.""
Matt Arsenault [Mon, 14 Apr 2014 21:50:37 +0000 (21:50 +0000)]
Revert "Revert r206045, "Fix shift by constants for vector.""

Fix cases where the Value itself is used, and not the constant value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206214 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ARM64][MC] Set the default CPU to cyclone when initilizating the MC layer.
Quentin Colombet [Mon, 14 Apr 2014 21:25:53 +0000 (21:25 +0000)]
[ARM64][MC] Set the default CPU to cyclone when initilizating the MC layer.
This matches that ARM64Subtarget does for now.

This is related to <rdar://problem/16573920>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206211 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRe-apply r206096 after investigating the gdb buildbot failure.
Adrian Prantl [Mon, 14 Apr 2014 21:16:04 +0000 (21:16 +0000)]
Re-apply r206096 after investigating the gdb buildbot failure.
Thanks to dblaikie for updating the testcase!

Debug info: (bugfix) C++ C/Dtors can be compiled to multiple functions,
therefore, their declaration cannot have one DW_AT_linkage_name.
The specific instances however can and should have that attribute.

This patch reorders the code in DwarfUnit::getOrCreateSubprogramDIE()
to emit linkage names for C/Dtors.

rdar://problem/16362674.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206210 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[cleanup] Run clang-format over most of YAMLParser.h to fix a bunch of
Chandler Carruth [Mon, 14 Apr 2014 21:12:15 +0000 (21:12 +0000)]
[cleanup] Run clang-format over most of YAMLParser.h to fix a bunch of
small formatting inconsistencies with the rest of LLVM and even this
file. I looked at all the changes and they seemed like just better
formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206209 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix for codegen bug that could cause illegal cmn instruction generation
Louis Gerbarg [Mon, 14 Apr 2014 21:05:05 +0000 (21:05 +0000)]
Fix for codegen bug that could cause illegal cmn instruction generation

In rare cases the dead definition elimination pass code can cause illegal cmn
instructions when it replaces dead registers on instructions that use
unmaterialized frame indexes. This patch disables the dead definition
optimization for instructions which include frame index operands.

rdar://16438284

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206208 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd a flag to disable the ARM64DeadRegisterDefinitionsPass
Louis Gerbarg [Mon, 14 Apr 2014 21:05:02 +0000 (21:05 +0000)]
Add a flag to disable the ARM64DeadRegisterDefinitionsPass

This patch adds a -arm64-dead-def-elimination flag so that it is possible to
disable dead definition elimination. Includes test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206207 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ARM64] Port over missing subtarget features, and CPU definitions from AArch64.
James Molloy [Mon, 14 Apr 2014 17:38:00 +0000 (17:38 +0000)]
[ARM64] Port over missing subtarget features, and CPU definitions from AArch64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206198 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ARM64] Add big endian target arm64_be.
James Molloy [Mon, 14 Apr 2014 17:37:53 +0000 (17:37 +0000)]
[ARM64] Add big endian target arm64_be.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206197 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoReplace two calls to object::symbol_iterator::increment(), which had
Kaelyn Takata [Mon, 14 Apr 2014 17:26:50 +0000 (17:26 +0000)]
Replace two calls to object::symbol_iterator::increment(), which had
been removed in r200442.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206196 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove a variable from r206192 that is only used in an assert.
Kaelyn Takata [Mon, 14 Apr 2014 17:21:50 +0000 (17:21 +0000)]
Remove a variable from r206192 that is only used in an assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206195 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix a bug in which BranchProbabilityInfo wasn't setting branch weights of basic block...
Akira Hatanaka [Mon, 14 Apr 2014 16:56:19 +0000 (16:56 +0000)]
Fix a bug in which BranchProbabilityInfo wasn't setting branch weights of basic blocks inside loops correctly.

Previously, BranchProbabilityInfo::calcLoopBranchHeuristics would determine the weights of basic blocks inside loops even when it didn't have enough information to estimate the branch probabilities correctly. This patch fixes the function to exit early if it doesn't see any exit edges or back edges and let the later heuristics determine the weights.

This fixes PR18705 and <rdar://problem/15991090>.

Differential Revision: http://reviews.llvm.org/D3363

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206194 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix 2008-03-05-SxtInRegBug.ll so that the CHECK-NOT will not match the filename.
Richard Trieu [Mon, 14 Apr 2014 16:53:50 +0000 (16:53 +0000)]
Fix 2008-03-05-SxtInRegBug.ll so that the CHECK-NOT will not match the filename.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206193 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix up MCFixup::getAccessVariant to handle unary expressions.
Kaelyn Takata [Mon, 14 Apr 2014 16:50:22 +0000 (16:50 +0000)]
Fix up MCFixup::getAccessVariant to handle unary expressions.

This allows correct relocations to be generated for a symbolic
address that is being adjusted by a negative constant. Since r204294,
such expressions have triggered undefined behavior when LLVM was built
without assertions.

Credit goes to Rafael for this patch; I'm submitting it on his behalf
as he is on vacation this week.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206192 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agotools: fix heap-buffer-overrun detected via ASAN
Saleem Abdulrasool [Mon, 14 Apr 2014 16:38:25 +0000 (16:38 +0000)]
tools: fix heap-buffer-overrun detected via ASAN

Once the auxiliary fields relating to the filename have been inspected, any
following auxiliary fields need not be visited as they have been consumed (the
following fields comprise the filepath as a single unit).

Adjust the test to catch this even if ASAN is not enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206190 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips] Fix fcopysign for MIPS-IV and add the test.
Daniel Sanders [Mon, 14 Apr 2014 16:24:12 +0000 (16:24 +0000)]
[mips] Fix fcopysign for MIPS-IV and add the test.

Summary:
This was another incorrect use of hasMips64() vs isGP64bit().

Depends on D3344

Reviewers: matheusalmeida, vmedic

Reviewed By: vmedic

Differential Revision: http://reviews.llvm.org/D3347

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206187 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips] MIPS-IV is broadly the same as MIPS64 so duplicate all -mcpu=mips64 tests...
Daniel Sanders [Mon, 14 Apr 2014 16:00:28 +0000 (16:00 +0000)]
[mips] MIPS-IV is broadly the same as MIPS64 so duplicate all -mcpu=mips64 tests with -mcpu=mips4 as a starting point

Summary:
Two exceptions to this:
  test/CodeGen/Mips/octeon.ll
  test/CodeGen/Mips/octeon_popcnt.ll
these test extensions to MIPS64

One test is altered for MIPS-IV:
  test/CodeGen/Mips/mips64countleading.ll
    Tests dclo/dclz which were added in MIPS64. The MIPS-IV version tests
    that dclo/dclz are not emitted.

Four tests fail and are not in this patch:
  test/CodeGen/Mips/abicalls.ll
  test/CodeGen/Mips/fcopysign-f32-f64.ll
  test/CodeGen/Mips/fcopysign.ll
  test/CodeGen/Mips/stack-alignment.ll

Depends on D3343

Reviewers: matheusalmeida, vmedic

Reviewed By: vmedic

Differential Revision: http://reviews.llvm.org/D3344

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206185 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips] Fix more incorrect uses of HasMips64 and isMips64()
Daniel Sanders [Mon, 14 Apr 2014 15:44:42 +0000 (15:44 +0000)]
[mips] Fix more incorrect uses of HasMips64 and isMips64()

Summary:
- Conditional moves acting on 64-bit GPR's should require MIPS-IV rather than MIPS64
- ISD::MUL, and ISD::MULH[US] should be lowered on all 64-bit ISA's

Patch by David Chisnall
His work was sponsored by: DARPA, AFRL

I've added additional testcases to cover as much of the codegen changes
affecting MIPS-IV as I can. Where I've been unable to find an existing
MIPS64 testcase that can be re-used for MIPS-IV (mainly tests covering
ISD::GlobalAddress and similar), I at least agree that MIPS-IV should
behave like MIPS64. Further testcases that are fixed by this patch will follow
in my next commit. The testcases from that commit that fail for MIPS-IV without
this patch are:
    LLVM :: CodeGen/Mips/2010-07-20-Switch.ll
    LLVM :: CodeGen/Mips/cmov.ll
    LLVM :: CodeGen/Mips/eh-dwarf-cfa.ll
    LLVM :: CodeGen/Mips/largeimmprinting.ll
    LLVM :: CodeGen/Mips/longbranch.ll
    LLVM :: CodeGen/Mips/mips64-f128.ll
    LLVM :: CodeGen/Mips/mips64directive.ll
    LLVM :: CodeGen/Mips/mips64ext.ll
    LLVM :: CodeGen/Mips/mips64fpldst.ll
    LLVM :: CodeGen/Mips/mips64intldst.ll
    LLVM :: CodeGen/Mips/mips64load-store-left-right.ll
    LLVM :: CodeGen/Mips/sint-fp-store_pattern.ll

Reviewers: dsanders

Reviewed By: dsanders

CC: matheusalmeida
Differential Revision: http://reviews.llvm.org/D3343

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206183 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTeach llvm-lto to respect the given RelocModel.
James Molloy [Mon, 14 Apr 2014 13:54:16 +0000 (13:54 +0000)]
Teach llvm-lto to respect the given RelocModel.

Patch by Nick Tomlinson!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206177 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM64: specify full triple in tests to pacify Windows.
Tim Northover [Mon, 14 Apr 2014 13:18:48 +0000 (13:18 +0000)]
ARM64: specify full triple in tests to pacify Windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206175 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64: add newline to end of test files.
Tim Northover [Mon, 14 Apr 2014 13:18:40 +0000 (13:18 +0000)]
AArch64: add newline to end of test files.

Should be no other change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206174 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM64: remove buggy REV16 pattern.
Tim Northover [Mon, 14 Apr 2014 12:59:52 +0000 (12:59 +0000)]
ARM64: remove buggy REV16 pattern.

The 32-bit pattern is still valid: 0123 -> 3210 -> 1032.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206172 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64/ARM64: enable directcond.ll test on ARM64.
Tim Northover [Mon, 14 Apr 2014 12:51:06 +0000 (12:51 +0000)]
AArch64/ARM64: enable directcond.ll test on ARM64.

Code change is because optimizeCompareInstr didn't know how to pull the
condition code out of FCSEL instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206171 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM64: add patterns for csXYZ with reversed operands.
Tim Northover [Mon, 14 Apr 2014 12:51:02 +0000 (12:51 +0000)]
ARM64: add patterns for csXYZ with reversed operands.

AArch64 tests for this, and it's obviously a good idea. Have to invert the
condition code, of course.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206170 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM64: enable more regression tests from AArch64
Tim Northover [Mon, 14 Apr 2014 12:50:58 +0000 (12:50 +0000)]
ARM64: enable more regression tests from AArch64

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206169 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM64: add support for AArch64's addsub_ext.ll
Tim Northover [Mon, 14 Apr 2014 12:50:50 +0000 (12:50 +0000)]
ARM64: add support for AArch64's addsub_ext.ll

There was one definite issue in ARM64 (the off-by-1 check for whether
a shift could be folded in) and one difference that is probably
correct: ARM64 didn't fold nodes with multiple uses into the
arithmetic operations unless optimising for code size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206168 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM64: optimise (cmp x, (sub 0, y)) to (cmn x, y).
Tim Northover [Mon, 14 Apr 2014 12:50:47 +0000 (12:50 +0000)]
ARM64: optimise (cmp x, (sub 0, y)) to (cmn x, y).

This transformation is only valid when being used for an EQ or NE
comparison since the flags change otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206167 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM64: start porting regression test suite from AArch64
Tim Northover [Mon, 14 Apr 2014 12:50:41 +0000 (12:50 +0000)]
ARM64: start porting regression test suite from AArch64

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206166 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDisplay the name of the project failing the url check in the release script
Arnaud A. de Grandmaison [Mon, 14 Apr 2014 12:36:48 +0000 (12:36 +0000)]
Display the name of the project failing the url check in the release script

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206164 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[XCore] Don't create invalid MKMSK instructions inside loadImmediate().
Richard Osborne [Mon, 14 Apr 2014 12:30:35 +0000 (12:30 +0000)]
[XCore] Don't create invalid MKMSK instructions inside loadImmediate().

Summary:
Previously loadImmediate() would produce MKMSK instructions with invalid
immediate values such as mkmsk r0, 9. Fix this by checking the mask size
is valid.

Reviewers: robertlytton

Reviewed By: robertlytton

CC: llvm-commits
Differential Revision: http://reviews.llvm.org/D3289

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206163 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoWhitespace.
NAKAMURA Takumi [Mon, 14 Apr 2014 07:03:13 +0000 (07:03 +0000)]
Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206154 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert r206045, "Fix shift by constants for vector."
NAKAMURA Takumi [Mon, 14 Apr 2014 07:02:57 +0000 (07:02 +0000)]
Revert r206045, "Fix shift by constants for vector."

It broke some builders, at least, i686.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206153 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Allocator] Hoist the external helper function into a namespace scope
Chandler Carruth [Mon, 14 Apr 2014 06:42:56 +0000 (06:42 +0000)]
[Allocator] Hoist the external helper function into a namespace scope
declaration. GCC 4.7 appears to get hopelessly confused by declaring
this function within a member function of a class template. Go figure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206152 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[cleanup] Normalize YAMLParser.h's doxygen markers with '\foo' instead
Chandler Carruth [Mon, 14 Apr 2014 06:22:03 +0000 (06:22 +0000)]
[cleanup] Normalize YAMLParser.h's doxygen markers with '\foo' instead
of '@foo'. The slash variant is prefered in LLVM and the file was
already using a mixture. =/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206151 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDon't assert in BasicTTI::getMemoryOpCost for non-simple types
Hal Finkel [Mon, 14 Apr 2014 05:59:09 +0000 (05:59 +0000)]
Don't assert in BasicTTI::getMemoryOpCost for non-simple types

BasicTTI::getMemoryOpCost must explicitly check for non-simple types; setting
AllowUnknown=true with TLI->getSimpleValueType is not sufficient because, for
example, non-power-of-two vector types return non-simple EVTs (not MVT::Other).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206150 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Allocator] Make the underlying allocator a template instead of an
Chandler Carruth [Mon, 14 Apr 2014 05:11:27 +0000 (05:11 +0000)]
[Allocator] Make the underlying allocator a template instead of an
abstract interface. The only user of this functionality is the JIT
memory manager and it is quite happy to have a custom type here. This
removes a virtual function call and a lot of unnecessary abstraction
from the common case where this is just a *very* thin vaneer around
a call to malloc.

Hopefully still no functionality changed here. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206149 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix the compile from r206147 in release builds by moving a variable
Chandler Carruth [Mon, 14 Apr 2014 04:46:30 +0000 (04:46 +0000)]
Fix the compile from r206147 in release builds by moving a variable
declaration outside of #ifndef NDEBUG -- its used elsewhere. Sorry for
the noise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206148 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Allocator] Switch the BumpPtrAllocator to use a vector of pointers to
Chandler Carruth [Mon, 14 Apr 2014 03:55:11 +0000 (03:55 +0000)]
[Allocator] Switch the BumpPtrAllocator to use a vector of pointers to
slabs rather than embedding a singly linked list in the slabs
themselves. This has a few advantages:

- Better utilization of the slab's memory by not wasting 16-bytes at the
  front.
- Simpler allocation strategy by not having a struct packed at the
  front.
- Avoids paging every allocated slab in just to traverse them for
  deallocating or dumping stats.

The latter is the really nice part. Folks have complained from time to
time bitterly that tearing down a BumpPtrAllocator, even if it doesn't
run any destructors, pages in all of the memory allocated. Now it won't.
=]

Also resolves a FIXME with the scaling of the slab sizes. The scaling
now disregards specially sized slabs for allocations larger than the
threshold.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206147 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agotools: simplify symbol handling in objdump
Saleem Abdulrasool [Mon, 14 Apr 2014 02:37:28 +0000 (02:37 +0000)]
tools: simplify symbol handling in objdump

Rather than switching behaviour on whether a previous symbol has an auxiliary
symbol record for the next count of elements, simply iterate over the auxiliary
symbols right after processing the current symbol entry.  This makes the
behaviour much simpler to follow and similar to llvm-readobj and yaml2obj.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206146 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agotools: address possible non-null terminated filenames
Saleem Abdulrasool [Mon, 14 Apr 2014 02:37:23 +0000 (02:37 +0000)]
tools: address possible non-null terminated filenames

If a filename is a multiple of 18 characters, there will be no null-terminator.
This will result in an invalid access by the constructed StringRef.  Add a test
case to exercise this and fix that handling.  Address this same vulnerability in
llvm-readobj as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206145 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse APInt arithmetic, fixed typo. Thanks to Benjamin Kramer for noticing that.
Serge Pavlov [Mon, 14 Apr 2014 02:20:19 +0000 (02:20 +0000)]
Use APInt arithmetic, fixed typo. Thanks to Benjamin Kramer for noticing that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206144 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd back some typecasts I accidentally lost in r206142.
Craig Topper [Mon, 14 Apr 2014 01:11:34 +0000 (01:11 +0000)]
Add back some typecasts I accidentally lost in r206142.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206143 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead...
Craig Topper [Mon, 14 Apr 2014 00:51:57 +0000 (00:51 +0000)]
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206142 91177308-0d34-0410-b5e6-96231b3b80d8