- Apr 14, 2014
-
-
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
-
Benjamin Kramer authored
While there make array_lengthof constexpr if we have support for it. llvm-svn: 206112
-
- Apr 12, 2014
-
-
Benjamin Kramer authored
No functionality change. llvm-svn: 206111
-
Benjamin Kramer authored
Making them inline was a historical accident, they're neither hot nor templated. llvm-svn: 206109
-
Logan Chien authored
llvm-svn: 206108
-
Hal Finkel authored
Target ABI code might add signext to the return types. llvm-svn: 206107
-
Tobias Grosser authored
We update to a newer version of isl, which includes changes to the compute out facility that make it a lot more predicable. With our new value, we can reliably bail out for all reported bugs, while still being able to compute dependences for all but two test cases in the LLVM test suite. For the remaining two test cases, the dependence problem we construct is unnecessarily complex, so there is hope we can improve on this. However, to avoid any future issues, having a reliable compute out facility in place is important. llvm-svn: 206106
-
David Blaikie authored
DWARF3 introduced DW_TAG_restrict_type, so avoid using it in prior versions. llvm-svn: 206105
-
Richard Trieu authored
on a directory name instead of the function name. llvm-svn: 206104
-
Adrian Prantl authored
This reverts commit 206096 while I investigate why this broke the gdb buildbot. llvm-svn: 206103
-
Simon Atanasyan authored
a couple of new virtual functions. Follow-up to the rL203408. Two virtual functions `createRelocationReference()` responsible for creation of `ELFReference` have been replaced by a couple of new virtual functions `createRelocationReferences()` (plural). Each former function creates a //single// ELFReference for a specified `Elf_Rela` or `Elf_Rel` relocation records. The new functions responsible for creation of //all// relocation references for provided symbol. For all targets except MIPS there are no functional changes. MIPS ABI has a notion of //paired// relocations. An effective addend of such relocations are calculated using addends of both pair's members. Each `R_MIPS_HI16` and `R_MIPS_GOT16` (for local symbols) relocations must have an associated `R_MIPS_LO16` entry immediately following it in the list of relocations. Immediately does not mean "next record" in relocations section but "next record referenced the same symbol". Moreover a single `R_MIPS_LO16` relocation can be paired with multiple preceding `R_MIPS_HI16/R_MIPS_GOT16` relocations. The paired relocation can have offsets belong to the different symbols. That is why we need to have access to list of all relocations during construction of `ELFReference` for MIPS target. The patch reviewed by Shankar Easwaran. llvm-svn: 206102
-
Juergen Ributzka authored
There is no need to check if we want to hoist the immediate value of an shift instruction. Simply return TCC_Free right away. llvm-svn: 206101
-
Juergen Ributzka authored
Originally the cost model would give up for large constants and just return the maximum cost. This is not what we want for constant hoisting, because some of these constants are large in bitwidth, but are still cheap to materialize. This commit fixes the cost model to either return TCC_Free if the cost cannot be determined, or accurately calculate the cost even for large constants (bitwidth > 128). This fixes <rdar://problem/16591573>. llvm-svn: 206100
-
Yunzhong Gao authored
llvm-svn: 206099
-
David Blaikie authored
Nice to be able to just print out the Tag and have the debugger print dwarf::DW_TAG_subprogram or whatever, rather than an int. It's a bit finicky (for example DIDescriptor::getTag still returns unsigned) because some places still handle real dwarf tags + our fake tags (one day we'll remove the fake tags, hopefully). llvm-svn: 206098
-
Eric Christopher authored
llvm-svn: 206097
-
Adrian Prantl authored
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. llvm-svn: 206096
-