- Apr 14, 2014
-
-
NAKAMURA Takumi authored
llvm-svn: 206154
-
NAKAMURA Takumi authored
It broke some builders, at least, i686. llvm-svn: 206153
-
Chandler Carruth authored
declaration. GCC 4.7 appears to get hopelessly confused by declaring this function within a member function of a class template. Go figure. llvm-svn: 206152
-
Chandler Carruth authored
of '@foo'. The slash variant is prefered in LLVM and the file was already using a mixture. =/ llvm-svn: 206151
-
Hal Finkel authored
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). llvm-svn: 206150
-
Chandler Carruth authored
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. =] llvm-svn: 206149
-
Chandler Carruth authored
declaration outside of #ifndef NDEBUG -- its used elsewhere. Sorry for the noise. llvm-svn: 206148
-
Chandler Carruth authored
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. llvm-svn: 206147
-
Saleem Abdulrasool authored
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. llvm-svn: 206146
-
Saleem Abdulrasool authored
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. llvm-svn: 206145
-
Serge Pavlov authored
llvm-svn: 206144
-
Craig Topper authored
llvm-svn: 206143
-
Craig Topper authored
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. llvm-svn: 206142
-
Hal Finkel authored
Implements the various TTI functions to enable constant hoisting on PPC. The only significant test-suite change is this: MultiSource/Benchmarks/VersaBench/bmm/bmm - 20% speedup (which essentially reverses the slowdown from r206120). llvm-svn: 206141
-
Saleem Abdulrasool authored
Now that COFF::coff_aux_file is defined, use that rather than redefining the type locally. llvm-svn: 206140
-
Saleem Abdulrasool authored
The auxiliary file records are contiguous and only contain the filename. Construct a StringRef directly rather than copying to a temporary buffer. Suggested by majnemer on IRC! llvm-svn: 206139
-
Saleem Abdulrasool authored
The values for the relocation type can (and do) overlap across various architectures. When performing an adjustment of the emitted relocation in the final object file, check that the file magic matches the target for which the relocation type is valid (e.g. a I386 relocation is only applied to an X86 object file, and an AMD64 relocation is only applied to an X86_64 object file). This was noticed while adding support for ARM WinCOFF object file emission. A test case for this is not really possible as the values for REL32 do not overlap on I386 and AMD64, which is why this was never noticed in practice. The ARM WinCOFF emission is not yet ready to merge into the tree. llvm-svn: 206138
-
Serge Pavlov authored
If multiplication involves zero-extended arguments and the result is compared as in the patterns: %mul32 = trunc i64 %mul64 to i32 %zext = zext i32 %mul32 to i64 %overflow = icmp ne i64 %mul64, %zext or %overflow = icmp ugt i64 %mul64 , 0xffffffff then the multiplication may be replaced by call to umul.with.overflow. This change fixes PR4917 and PR4918. Differential Revision: http://llvm-reviews.chandlerc.com/D2814 llvm-svn: 206137 -
Hal Finkel authored
We had been using the known-zero values of the operand of the or to construct the mask for an rlwimi; this is not quite correct, but fine when the mask is constant. When the mask is constant, then the known zeros of the operand must be a superset of the zeros in the mask. However, when the mask is not a constant, then there might be bits in the operand that are not known to be zero that, at runtime, might be zero in the mask. Therefore, we check that any bits not known to be zero *are* known to be one in the mask. Otherwise, we can't fold the mask with the or and shift. This was revealed as a miscompile of MultiSource/Benchmarks/BitBench/drop3/drop3 when I started experimenting with constant hoisting. llvm-svn: 206136
-
Serge Pavlov authored
Parse of nested name spacifier is modified so that it properly recovers if colon is mistyped as double colon in case statement. This patch fixes PR15133. Differential Revision: http://llvm-reviews.chandlerc.com/D2870 llvm-svn: 206135
-
Tobias Grosser authored
llvm-svn: 206134
-
Logan Chien authored
If the C-style type cast is applied to the overloaded function and the destination type is function type, then Clang will crash with assertion failure. For example, void foo(int); void foo(int, int); void bar() { typedef void (ft)(int); ft p = (ft)foo; } In this case, the overloaded function foo will be cast to a function type, which should be considered as an error. But, unfortunately, since the function resolution is using canonical type, the matched function will be returned, and result in SEGV. This patch fixes this issue by removing the assertion and add some error diagnostics as the one in static_cast. llvm-svn: 206133
-
- Apr 13, 2014
-
-
David Majnemer authored
Don't consider a __declspec(align) on a bitfield's declaration if it didn't allocate any underlying storage. This fixes PR19414. llvm-svn: 206132
-
David Blaikie authored
I found this from a particular GDB test suite case of inlining (something similar is provided as a test case) but came across a few other related cases (other callers of the same functions, and one other instance of the same coding mistake in a separate function). I'm not sure what the best way to test this is (let alone to cover the other cases I discovered), so hopefully this sufficies - open to ideas. llvm-svn: 206130
-
Craig Topper authored
[C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. llvm-svn: 206129
-
Richard Smith authored
properly. llvm-svn: 206128
-
Lang Hames authored
llvm-svn: 206127
-
Saleem Abdulrasool authored
Add support for file auxiliary symbol entries in COFF symbol tables. A COFF symbol table with a FILE entry is followed by sizeof(__FILE__) / 18 auxiliary symbol records which contain the filename. Read them and form the original filename that the record contains. Then display the name in the output. llvm-svn: 206126
-
David Majnemer authored
__FUNCDNAME__ was introduced way back in r194181 but I forgot to add these tests. llvm-svn: 206125
-
David Majnemer authored
Previously, it was believed that #pragma vtordisp(0) would prohibit the generation of any and all vtordisps. In actuality, it only disables the generation of additional vtordisps. This fixes PR19413. llvm-svn: 206124
-
Richard Smith authored
llvm-svn: 206123
-
Nick Kledzik authored
llvm-svn: 206122
-
Nick Kledzik authored
llvm-svn: 206121
-
Hal Finkel authored
Add implementations of: bool isLegalICmpImmediate(int64_t Imm) const bool isLegalAddImmediate(int64_t Imm) const bool isTruncateFree(Type *Ty1, Type *Ty2) const bool isTruncateFree(EVT VT1, EVT VT2) const bool shouldConvertConstantLoadToIntImm(const APInt &Imm, Type *Ty) const Unfortunately, this regresses counter-register-based loop formation because some of the loops now end up in forms were SE cannot compute loop counts. However, nevertheless, the test-suite results favor committing: SingleSource/Benchmarks/BenchmarkGame/puzzle: 26% speedup MultiSource/Benchmarks/FreeBench/analyzer/analyzer: 21% speedup MultiSource/Benchmarks/MiBench/automotive-susan/automotive-susan: 20% speedup SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/trisolv: 19% speedup SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/gesummv: 15% speedup MultiSource/Benchmarks/FreeBench/pcompress2/pcompress2: 2% speedup MultiSource/Benchmarks/VersaBench/bmm/bmm: 26% slowdown llvm-svn: 206120
-
Joerg Sonnenberger authored
llvm-svn: 206119
-
Joerg Sonnenberger authored
llvm-svn: 206118
-
Benjamin Kramer authored
Not sure why clang didn't diagnose this (GCC does). llvm-svn: 206117
-
Benjamin Kramer authored
llvm-svn: 206116
-
Saleem Abdulrasool authored
llvm-svn: 206115
-
Benjamin Kramer authored
llvm-svn: 206113
-