summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* AsmWriter/Bitcode: MDSubroutineTypeDuncan P. N. Exon Smith2015-02-134-9/+39
| | | | llvm-svn: 229011
* AsmWriter: MDCompositeType: Recognize DW_LANG in 'runtimeLang'Duncan P. N. Exon Smith2015-02-134-3/+51
| | | | llvm-svn: 229010
* AsmWriter/Bitcode: MDDerivedType and MDCompositeTypeDuncan P. N. Exon Smith2015-02-134-20/+224
| | | | llvm-svn: 229009
* AsmWriter/Bitcode: MDFileDuncan P. N. Exon Smith2015-02-134-7/+41
| | | | llvm-svn: 229007
* AsmWriter: MDBasicType: Recognize DW_ATE in 'encoding'Duncan P. N. Exon Smith2015-02-134-8/+40
| | | | llvm-svn: 229006
* AsmWriter/Bitcode: MDBasicTypeDuncan P. N. Exon Smith2015-02-134-8/+55
| | | | llvm-svn: 229005
* AsmWriter/Bitcode: MDEnumeratorDuncan P. N. Exon Smith2015-02-134-7/+39
| | | | llvm-svn: 229004
* AsmWriter/Bitcode: MDSubrangeDuncan P. N. Exon Smith2015-02-134-8/+80
| | | | llvm-svn: 229003
* IR: Add MDExpression::ExprOperandDuncan P. N. Exon Smith2015-02-132-0/+33
| | | | | | | | Port `DIExpression::Operand` over to `MDExpression::ExprOperand`. The logic is needed directly in `MDExpression` to support printing in assembly. llvm-svn: 229002
* Support: Add dwarf::getOperationEncoding()Duncan P. N. Exon Smith2015-02-131-0/+7
| | | | llvm-svn: 229001
* Support: Rewrite LocationAtom and OperationEncodingString(), NFCDuncan P. N. Exon Smith2015-02-131-162/+5
| | | | | | Use `Dwarf.def` more. llvm-svn: 229000
* [LinkModules] Change the way ModuleLinker merges triples.Akira Hatanaka2015-02-131-7/+33
| | | | | | | | | | | | | | | | This commit makes the following changes: - Stop issuing a warning when the triples' string representations do not match exactly if the Triple objects generated from the strings compare equal. - On Apple platforms, choose the triple that has the larger minimum version number. rdar://problem/16743513 Differential Revision: http://reviews.llvm.org/D7591 llvm-svn: 228999
* PPCFrameLowering's FramePointerOffset can be computed at initializationEric Christopher2015-02-133-28/+25
| | | | | | time. Do so. llvm-svn: 228998
* The TOC save offset can be computed at compile time, do so andEric Christopher2015-02-133-7/+10
| | | | | | propagate changes. llvm-svn: 228997
* The return save offset can be computed at initialization time - doEric Christopher2015-02-133-17/+19
| | | | | | so and save the value. llvm-svn: 228996
* [unroll] Don't use a map from pointer to bool. Use a set.Chandler Carruth2015-02-131-4/+4
| | | | | | | | | This is much more efficient. In particular, the query with the user instruction has to insert a false for every missing instruction into the set. This is just a cleanup a long the way to fixing the underlying algorithm problems here. llvm-svn: 228994
* Prevent division by 0.Michael Zolotukhin2015-02-131-1/+1
| | | | | | | | When we try to estimate number of potentially removed instructions in loop unroller, we analyze first N iterations and then scale the computed number by TripCount/N. We should bail out early if N is 0. llvm-svn: 228988
* [unroll] Update the new analysis logic from r228265 to use modern codingChandler Carruth2015-02-131-10/+10
| | | | | | | conventions for function names consistently. Some were already using this but not all. llvm-svn: 228987
* Add support for having multiple sections with the same name and comdat.Rafael Espindola2015-02-125-23/+51
| | | | | | | | Using this in combination with -ffunction-sections allows LLVM to output a .o file with mulitple sections named .text. This saves space by avoiding long unique names of the form .text.<C++ mangled name>. llvm-svn: 228980
* X86: Don't crash if we can't decode the pshufb maskDavid Majnemer2015-02-121-0/+2
| | | | | | | | | | | Constant pool entries are uniqued by their contents regardless of their type. This means that a pshufb can have a shuffle mask which isn't a simple array of bytes. The code path which attempts to decode the mask didn't check for failure, causing PR22559. llvm-svn: 228979
* Learn that __DATA,__objc_classrefs is not atomized via symbols.Rafael Espindola2015-02-122-0/+8
| | | | | | This should hopefully fix objc on AArch64. llvm-svn: 228976
* Change max interleave factor to 12 for POWER7 and POWER8.Olivier Sallenave2015-02-121-0/+6
| | | | llvm-svn: 228973
* [SDAG] Don't try to use FP_EXTEND/FP_ROUND for int<->fp promotionsHal Finkel2015-02-121-3/+5
| | | | | | | | | | The PowerPC backend has long promoted some floating-point vector operations (such as select) to integer vector operations. Unfortunately, this behavior was broken by r216555. When using FP_EXTEND/FP_ROUND for promotions, we must check that both the old and new types are floating-point types. Otherwise, we must use BITCAST as we did prior to r216555 for everything. llvm-svn: 228969
* IR: Stop abusing DW_TAG_base_type for compile unit arraysDuncan P. N. Exon Smith2015-02-121-9/+9
| | | | | | | | | | | | | | | | | | | | The sub-arrays for compile units have for a long time been initialized to distinct temporary nodes with the `DW_TAG_base_type` tag, with no other operands. These invalid `DIBasicType`s are later replaced with appropriate arrays. This seems like a poor man's assertion that the arrays do eventually get replaced. These days, temporaries in the graph will cause assertions when writing bitcode or assembly, so this isn't necessary. Use temporary empty tuples instead. Note that the whole idea of using temporaries and then replacing them later is wasteful here. We never actually want to merge compile units by uniquing based on content. Compile units should use `getDistinct()` instead of `get()`, and then their operands can be freely replaced later on. llvm-svn: 228967
* Remove mostly unused setters.Rafael Espindola2015-02-122-25/+1
| | | | | | Most of the code was setting the TargetOptions directly. llvm-svn: 228961
* Add concrete type overloads to PDBSymbol::findChildren().Zachary Turner2015-02-126-35/+29
| | | | | | | | | | | | Frequently you only want to iterate over children of a specific type (e.g. functions). Previously you would get back a generic interface that allowed iteration over the base symbol type, which you would have to dyn_cast<> each one of. With this patch, we allow the user to specify the concrete type as a template parameter, and it will return an iterator which returns instances of the concrete type directly. llvm-svn: 228960
* Add bulk of returning of values to Mips fast-iselReed Kotler2015-02-121-4/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Implement the bulk of returning values in Mips fast-isel Test Plan: reatabi.ll Passes test-suite at -O0,-O2 and with mips32r2 and mips32r1. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits, aemerson, rfuhler Differential Revision: http://reviews.llvm.org/D5920 llvm-svn: 228958
* Fix a crash in the assumption cache when inlining indirect function callsBjorn Steinbrink2015-02-121-6/+6
| | | | | | | | | | | | | | | | | Summary: Instances of the AssumptionCache are per function, so we can't re-use the same AssumptionCache instance when recursing in the CallAnalyzer to analyze a different function. Instead we have to pass the AssumptionCacheTracker to the CallAnalyzer so it can get the right AssumptionCache on demand. Reviewers: hfinkel Subscribers: llvm-commits, hans Differential Revision: http://reviews.llvm.org/D7533 llvm-svn: 228957
* InstCombine: Allow folding of xor into icmp by changing the predicate for ↵Benjamin Kramer2015-02-121-3/+4
| | | | | | | | vectors The loop vectorizer can create this pattern. llvm-svn: 228954
* Relaxed over-zealous alignment requirement for VEX-encoded AES instructionsSimon Pilgrim2015-02-121-2/+2
| | | | llvm-svn: 228953
* On ELF, put PIC jump tables in a non executable section.Rafael Espindola2015-02-123-13/+29
| | | | | | Fixes PR22558. llvm-svn: 228939
* Put each jump table in an independent section if the function is too.Rafael Espindola2015-02-123-4/+30
| | | | | | This allows the linker to GC both, fixing pr22557. llvm-svn: 228937
* Fix accidental bit flip.Benjamin Kramer2015-02-121-2/+2
| | | | llvm-svn: 228936
* CoverageMapping: Bitvectorize code. No functionality change.Benjamin Kramer2015-02-121-27/+20
| | | | llvm-svn: 228934
* [LoopRerolling] Be more forgiving with instruction order.James Molloy2015-02-121-17/+82
| | | | | | | | | We can't solve the full subgraph isomorphism problem. But we can allow obvious cases, where for example two instructions of different types are out of order. Due to them having different types/opcodes, there is no ambiguity. llvm-svn: 228931
* MathExtras: Bring Count(Trailing|Leading)Ones and CountPopulation in line ↵Benjamin Kramer2015-02-1219-45/+43
| | | | | | | | with countTrailingZeros Update all callers. llvm-svn: 228930
* Triple: refactor redundant code.Tim Northover2015-02-121-19/+5
| | | | | | | | | | Should be no functional change, since most of the logic removed was completely pointless (after some previous refactoring) and the rest duplicated elsewhere. Patch by Kamil Rytarowski. llvm-svn: 228926
* [X86] Call frame optimization - allow stack-relative movs to be folded into ↵Michael Kuperstein2015-02-121-6/+0
| | | | | | | | a push Since we track esp precisely, there's no reason not to allow this. llvm-svn: 228924
* ARM: Fix another regression introduced in r223113Asiri Rathnayake2015-02-121-5/+0
| | | | | | | | | | | | | | | | | | | | | The changes in r223113 (ARM modified-immediate syntax) have broken instructions like: mov r0, #~0xffffff00 The problem is that I've added a spurious range check on the immediate operand to ensure that it lies between INT32_MIN and UINT32_MAX. While this range check is correct in theory, it causes problems because the operand is stored in an int64_t (by MC). So valid 32-bit constants like \#~0xffffff00 become out of range. The solution is to simply remove this range check. It is not possible to validate the range of the immediate operand with the current setup because: 1) The operand is stored in an int64_t by MC, 2) The immediate can be of the forms #imm, #-imm, #~imm or even #((~imm)) etc. So we just chop the value to 32 bits and use it. Also noted that the original range check was note tested by any of the unit tests. I've added a new test to cover #~imm kind of operands. Change-Id: I411e90d84312a2eff01b732bb238af536c4a7599 llvm-svn: 228920
* tsan: do not instrument not captured valuesDmitry Vyukov2015-02-121-0/+15
| | | | | | | | | | | | | | | | I've built some tests in WebRTC with and without this change. With this change number of __tsan_read/write calls is reduced by 20-40%, binary size decreases by 5-10% and execution time drops by ~5%. For example: $ ls -l old/modules_unittests new/modules_unittests -rwxr-x--- 1 dvyukov 41708976 Jan 20 18:35 old/modules_unittests -rwxr-x--- 1 dvyukov 38294008 Jan 20 18:29 new/modules_unittests $ objdump -d old/modules_unittests | egrep "callq.*__tsan_(read|write|unaligned)" | wc -l 239871 $ objdump -d new/modules_unittests | egrep "callq.*__tsan_(read|write|unaligned)" | wc -l 148365 http://reviews.llvm.org/D7069 llvm-svn: 228917
* AVX-512: Fixed the "test" operation for i1 typeElena Demikhovsky2015-02-123-33/+8
| | | | | | | | | | | | Using KORTESTW for comparison i1 value with zero was wrong since the instruction tests 16 bits. KORTESTW may be used with KSHIFTL+KSHIFTR that clean the 15 upper bits. I removed (X86cmp i1, 0) pattern and zero-extend i1 to i8 and then use TESTB. There are some cases where i1 is in the mask register and the upper bits are already zeroed. Then KORTESTW is the better solution, but it is subject for optimization. Meanwhile, I'm fixing the correctness issue. llvm-svn: 228916
* [X86] A heuristic to estimate the size impact for converting stack-relative ↵Michael Kuperstein2015-02-121-25/+71
| | | | | | | | | | | | | parameter movs to pushes This gives a rough estimate of whether using pushes instead of movs is profitable, in terms of size. We go over all calls in the MachineFunction and compute: a) For each callsite that can not use pushes, the penalty of not having a reserved call frame. b) For each callsite that can use pushes, the gain of actually replacing the movs with pushes (and the potential penalty of having to readjust the stack). Differential Revision: http://reviews.llvm.org/D7561 llvm-svn: 228915
* [CodeGen] Don't blindly combine (fp_round (fp_round x)) to (fp_round x).Ahmed Bougacha2015-02-121-5/+10
| | | | | | | | | | | | We used to do this DAG combine, but it's not always correct: If the first fp_round isn't a value preserving truncation, it might introduce a tie in the second fp_round, that wouldn't occur in the single-step fp_round we want to fold to. In other words, double rounding isn't the same as rounding. Differential Revision: http://reviews.llvm.org/D7571 llvm-svn: 228911
* Fixed a bug where CFLAA would crash the compiler.George Burgess IV2015-02-121-6/+13
| | | | | | | | We would crash if we couldn't locate a Function that either Location's Value belonged to. Now we just print out a debug message and return conservatively. llvm-svn: 228901
* [slp] Fix a nasty bug in the SLP vectorizer that Joerg pointed out.Chandler Carruth2015-02-122-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently some code finally started to tickle this after my canonicalization changes to instcombine. The bug stems from trying to form a vector type out of scalars that aren't compatible at all. In this example, from x86_mmx values. The code in the vectorizer that checks for reasonable types whas checking for aggregates or vectors, but there are lots of other types that should just never reach the vectorizer. Debugging this was made more confusing by the lie in an assert in VectorType::get() -- it isn't that the types are *primitive*. The types must be integer, pointer, or floating point types. No other types are allowed. I've improved the assert and added a helper to the vectorizer to handle the element type validity checks. It now re-uses the VectorType static function and then further excludes weird target-specific types that we probably shouldn't be touching here (x86_fp80 and ppc_fp128). Neither of these are really reachable anyways (neither 80-bit nor 128-bit things will get vectorized) but it seems better to just eagerly exclude such nonesense. I've added a test case, but while it definitely covers two of the paths through this code there may be more paths that would benefit from test coverage. I'm not familiar enough with the SLP vectorizer to synthesize test cases for all of these, but was able to update the code itself by inspection. llvm-svn: 228899
* [PowerPC] Mark jumps as expensive (using using CR bits)Hal Finkel2015-02-121-1/+3
| | | | | | | | | | | | | | | On PowerPC, which has a full set of logical operations on (its multiple sets of) condition-register bits, it is not profitable to break of complex conditions feeding a jump into multiple jumps. We can turn off this feature of CGP/SDAGBuilder by marking jumps as "expensive". P7 test-suite speedups (no regressions): MultiSource/Benchmarks/FreeBench/pcompress2/pcompress2 -0.626647% +/- 0.323583% MultiSource/Benchmarks/Olden/power/power -18.2821% +/- 8.06481% llvm-svn: 228895
* Revert "Change Path::filename_pos() to skip the drive letter."Zachary Turner2015-02-121-5/+2
| | | | | | | | This reverts commit 228874. For some reason users reported seeing Clang taking up 25+GB of memory and bringing down machines with this change. Reverting until we figure it out. llvm-svn: 228890
* Invert the section relocation map.Rafael Espindola2015-02-111-31/+26
| | | | | | | It now points from rel section to section. Use it to set sh_info, avoiding a brittle name lookup. llvm-svn: 228889
* Use the existing SymbolTableIndex instead of doing a lookup. NFC.Rafael Espindola2015-02-111-7/+3
| | | | llvm-svn: 228888
* Create the Seciton -> Rel Section map when it is first needed. NFC.Rafael Espindola2015-02-111-47/+45
| | | | | | Saves a walk over every section. llvm-svn: 228886
OpenPOWER on IntegriCloud