summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Reset some of the target options which affect code generation.Bill Wendling2013-03-132-0/+27
| | | | | | | | This doesn't reset all of the target options within the TargetOptions object. This is because some of those are ABI-specific and must be determined if it's okay to change those on the fly. llvm-svn: 176986
* Remove the unused 4th operand for DIFile debug info metadataDavid Blaikie2013-03-132-2/+1
| | | | llvm-svn: 176983
* Add some additonal attribute helper functions. Test will be on followReed Kotler2013-03-131-0/+7
| | | | | | up putback to clang for mips16. llvm-svn: 176968
* R600: Remove unused Outputs variableVincent Lejeune2013-03-132-2/+0
| | | | llvm-svn: 176967
* No functionality change. Use unreachable in getCUOffset.Manman Ren2013-03-131-1/+3
| | | | llvm-svn: 176963
* No functionality change. Use unreachable in getCompileUnit.Manman Ren2013-03-131-1/+1
| | | | llvm-svn: 176962
* Check register classes also when changing them.Jakob Stoklund Olesen2013-03-131-0/+1
| | | | | | We have the same assertion in createVirtualRegister. llvm-svn: 176959
* Fix a performance regression when combining to smaller types in icmp (shl ↵Arnaud A. de Grandmaison2013-03-131-3/+4
| | | | | | | | %v, C1), C2 : Only combine when the shl is only used by the icmp llvm-svn: 176950
* Add one more overload to make VS2008's debug mody happy.Benjamin Kramer2013-03-131-0/+3
| | | | | | sigh. llvm-svn: 176946
* [mips] Define two subclasses of MipsTargetLowering. Mips16TargetLowering is forAkira Hatanaka2013-03-139-878/+1106
| | | | | | | | mips16 and MipsSETargetLowering is for mips32/64. No functionality changes. llvm-svn: 176917
* Refactor filename/directory in DICompileUnit into a DIFileDavid Blaikie2013-03-132-12/+10
| | | | | | | This is the next step towards making the metadata for DIScopes have a common prefix rather than having to delegate based on their tag type. llvm-svn: 176913
* Don't crash if write_impl() leaves less buffer space available than expected.Matt Beaumont-Gay2013-03-121-1/+6
| | | | | | This was tickled by a Clang diagnostic; Clang test case to follow. llvm-svn: 176911
* Remove unused "isMain" field from DICompileUnitDavid Blaikie2013-03-122-11/+9
| | | | llvm-svn: 176910
* [Support][Path] Don't inf loop if creating the parent directory fails.Michael J. Spencer2013-03-121-1/+7
| | | | | | Patch by Paul Robinson. llvm-svn: 176908
* Update debug info test cases with empty SplitDebugFilename field.David Blaikie2013-03-121-4/+4
| | | | | | | | | | | | This could be 'null' or the empty string, DIDescriptor::getStringField coalesces the two cases anyway so it's just a matter of legible/efficient representation. The change in behavior of the DICompileUnit::get* functions could be subsumed by the full verification check - but ideally that should just be an assertion if we could front-load the actual debug info metadata failure paths. llvm-svn: 176907
* ARM cost model: Increase the cost for vector casts that use the stackArnold Schwaighofer2013-03-121-0/+8
| | | | | | | | | | | | | | | | | | | | | | | Increase the cost of v8/v16-i8 to v8/v16-i32 casts and truncates as the backend currently lowers those using stack accesses. This was responsible for a significant degradation on MultiSource/Benchmarks/Trimaran/enc-pc1/enc-pc1 where we vectorize one loop to a vector factor of 16. After this patch we select a vector factor of 4 which will generate reasonable code. unsigned char cle[32]; void test(short c) { unsigned short compte; for (compte = 0; compte <= 31; compte++) { cle[compte] = cle[compte] ^ c; } } radar://13220512 llvm-svn: 176898
* Debug Info: use SmallVector instead of std::vector in MCDwarfDirsCUMap and ↵Manman Ren2013-03-123-9/+9
| | | | | | MCDwarfFilesCUMap llvm-svn: 176893
* [Support][MemoryBuffer] Use sys::fs::mapped_file_region instead of ↵Michael J. Spencer2013-03-121-35/+44
| | | | | | | | sys::Path::MapInFilePages. This gives us memory mapped file I/O on Windows. llvm-svn: 176886
* Debug Info: use DW_FORM_ref_addr instead of DW_FORM_ref4 if the referenced DIEManman Ren2013-03-126-4/+54
| | | | | | | | | | | | | | | | belongs to a different compile unit. DW_FORM_ref_addr should be used for cross compile-unit reference. When compiling a large application, we got a dwarfdump verification error where abstract_origin points to nowhere. This error can't be reproduced on any testing case in MultiSource. We may have other cases where we use DW_FORM_ref4 unconditionally. rdar://problem/13370501 llvm-svn: 176882
* Avoid generating ISD::SELECT for vector operands to SIGN_EXTENDRichard Relph2013-03-121-2/+2
| | | | llvm-svn: 176881
* Remove the assert()'s from the LLVMCreateDisasmCPU() library API and justKevin Enderby2013-03-121-8/+16
| | | | | | | | | | | | | | | | | | | | | return 0 to indicate failure to create the disassembler. A library routine should not assert and just let the caller handler the error. For example darwin's otool(1) will simply print an error if it ends up using a library that is not configured for a target it wants: % otool -tv ViewController.o ViewController.o: (__TEXT,__text) section can't create arm llvm disassembler This is much better than an abort which appears as a crash to the user or even the assert when using a Debug+Asserts built library: Assertion failed: (MAI && "Unable to create target asm info!"), function LLVMCreateDisasmCPU, file /Volumes/SandBox/llvm/lib/MC/MCDisassembler/Disassembler.cpp, line 47. radr://12539918 llvm-svn: 176880
* Add a doFinalization method to the DataLayout pass.Pete Cooper2013-03-121-0/+6
| | | | | | | | | | | | | | | This pass is meant to be immutable, however it holds mutable state to cache StructLayouts. This method will allow the pass manager to clear the mutable state between runs. Note that unfortunately it is still necessary to have the destructor, even though it does the same thing as doFinalization. This is because most TargetMachines embed a DataLayout on which doFinalization isn't run as its never added to the pass manager. I also didn't think it was necessary to complication things with a deInit method for which doFinalization and ~DataLayout both call as there's only one field of mutable state. If we had more fields to finalize i'd have added this. llvm-svn: 176877
* Change the order of the operands in patchAndReplaceAllUsesWith soDan Gohman2013-03-121-5/+5
| | | | | | that they're more consistent with Value::replaceAllUsesWith. llvm-svn: 176872
* Don't reserve R2 on Darwin/PPCHal Finkel2013-03-121-16/+2
| | | | | | | | | | | Now that only the register-scavenger version of the CR spilling code remains, we no longer need the Darwin R2 hack. Darwin can use R0 as a spare register in any case where the System V ABI uses it (R0 is special architecturally, and so is reserved under all common ABIs). A few test cases needed to be updated to reflect the register-allocation changes. llvm-svn: 176868
* PPC should always use the register scavenger for CR spillingHal Finkel2013-03-123-137/+29
| | | | | | | | This removes the -disable-ppc[32|64]-regscavenger options; the code that uses the register scavenger has been working well (and has been the default) for some time, and we don't need options to enable the old (broken) CR spilling code. llvm-svn: 176865
* Small fix for cost analysis of ptrtoint.Patrik Hagglund2013-03-121-2/+2
| | | | | | This seems to be a "copy-paste error" introducecd in r156140. llvm-svn: 176863
* [mips] Rename function and variable names to start with proper case. Fix typos.Akira Hatanaka2013-03-123-571/+493
| | | | | | Delete commented-out code. llvm-svn: 176844
* LibCallSimplifier: optimize speed for short-lived instancesMeador Inge2013-03-121-177/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | Nadav reported a performance regression due to the work I did to merge the library call simplifier into instcombine [1]. The issue is that a new LibCallSimplifier object is being created whenever InstCombiner::runOnFunction is called. Every time a LibCallSimplifier object is used to optimize a call it creates a hash table to map from a function name to an object that optimizes functions of that name. For short-lived LibCallSimplifier instances this is quite inefficient. Especially for cases where no calls are actually simplified. This patch fixes the issue by dropping the hash table and implementing an explicit lookup function to correlate the function name to the object that optimizes functions of that name. This avoids the cost of always building and destroying the hash table in cases where the LibCallSimplifier object is short-lived and avoids the cost of building the table when no simplifications are actually preformed. On a benchmark containing 100,000 calls where none of them are simplified I noticed a 30% speedup. On a benchmark containing 100,000 calls where all of them are simplified I noticed an 8% speedup. [1] http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130304/167639.html llvm-svn: 176840
* Remove support for versioned debug info.David Blaikie2013-03-115-238/+111
| | | | | | | | | | | | | | | | | | | | | | | | Versioned debug info support has been a burden to maintain & also compromised current debug info verification by causing test cases testing old debug info to remain rather than being updated to the latest. It also makes it hard to add or change the metadata schema by requiring various backwards-compatibility in the DI* hierarchy. So it's being removed in preparation for new changes to the schema to tidy up old/unnecessary fields and add new fields needed for new debug info (well, new to LLVM at least). The more surprising part of this is the changes to DI*::Verify - this became necessary due to the changes to AsmWriter. AsmWriter was relying on the version test to decide which bits of metadata were actually debug info when printing the comment annotations. Without the version information the tag numbers were too common & it would print debug info on random metadata that happened to start with an integer that matched a tag number. Instead this change makes the Verify functions more precise (just adding "number of operands" checks - not type checking those operands yet) & relies on that to decide which metadata is debug info metadata. llvm-svn: 176838
* Add asserts to DIBuilder & fix DINameSpace::Verify to allow unnamed namespaces.David Blaikie2013-03-112-8/+31
| | | | llvm-svn: 176837
* Fix a crasher newly introduced in r176659/r176649, where fast-isel tries toNick Lewycky2013-03-111-0/+2
| | | | | | lower an expect intrinsic that is a constant expression. llvm-svn: 176830
* Fixes disassembler crashes on 2013 Haswell RTM instructions.Kevin Enderby2013-03-111-1/+1
| | | | | | rdar://13318048 llvm-svn: 176828
* Don't remove a landing pad if the invoke requires a table entry.Bill Wendling2013-03-111-3/+17
| | | | | | | | An invoke may require a table entry. For instance, when the function it calls is expected to throw. <rdar://problem/13360379> llvm-svn: 176827
* R600: Fix JUMP handling so that MachineInstr verification can occurVincent Lejeune2013-03-114-45/+59
| | | | | | This allows R600 Target to use the newly created -verify-misched llc flag llvm-svn: 176819
* R600MachineScheduler.cpp: Fix use cases of dbgs(). Don't include <iostream> ↵NAKAMURA Takumi2013-03-111-1/+2
| | | | | | here. llvm-svn: 176797
* Correct this error message, and most importantly make it distinct from theNick Lewycky2013-03-101-1/+1
| | | | | | error above. Based on a patch by Peter Zotov! llvm-svn: 176794
* Use LLVMBool instead of 'bool' in the C API. Based on a patch by Peter Zotov!Nick Lewycky2013-03-101-3/+3
| | | | llvm-svn: 176793
* BBVectorize: Fixup debugging statementsHal Finkel2013-03-101-2/+2
| | | | | | | After the recent data-structure improvements, a couple of debugging statements were broken (printing pointer values). llvm-svn: 176791
* Cleanup #includes.Jakub Staszak2013-03-102-1/+4
| | | | llvm-svn: 176787
* Remove unneeded #includes. Use forward declarations instead.Jakub Staszak2013-03-101-0/+5
| | | | llvm-svn: 176783
* Remove an unused member variable from HelpPrinter. Move another member ↵Craig Topper2013-03-091-6/+2
| | | | | | variable to be a local variable in the only method that uses it. llvm-svn: 176778
* Don't glue users to extract_subreg when selecting the llvm.arm.ldrexdLang Hames2013-03-091-6/+4
| | | | | | | | | intrinsic - it can cause impossible-to-schedule subgraphs to be introduced. PR15053. llvm-svn: 176777
* Remove a source of nondeterminism from the LoopVectorizer.Benjamin Kramer2013-03-091-1/+1
| | | | | | | This made us emit runtime checks in a random order. Hopefully bootstrap miscompares will go away now. llvm-svn: 176775
* LoopVectorizer: Ignore all dbg intrinisicArnold Schwaighofer2013-03-091-6/+6
| | | | | | Ignore all DbgIntriniscInfo instructions instead of just DbgValueInst. llvm-svn: 176769
* LoopVectorizer: Ignore dbg.value instructionsArnold Schwaighofer2013-03-091-2/+11
| | | | | | | | | We want vectorization to happen at -g. Ignore calls to the dbg.value intrinsic and don't transfer them to the vectorized code. radar://13378964 llvm-svn: 176768
* TLI: Microoptimize calls to strlen+memcmp to strncmp.Benjamin Kramer2013-03-091-2/+24
| | | | | | | | The strlen+memcmp was hidden in a call to StringRef::operator==. We check if there are any null bytes in the string upfront so we can simplify the comparison Small speedup when compiling code with many function calls. llvm-svn: 176766
* Simplify code. No functionality change.Jakub Staszak2013-03-091-2/+2
| | | | llvm-svn: 176765
* Use the correct index variable. This is the meat of what was supposed to be inNick Lewycky2013-03-091-1/+1
| | | | | | r176751. Also, learn a lesson about applying patches by hand/eyeball. llvm-svn: 176764
* Commit the right files for r176762. Sigh.Nick Lewycky2013-03-091-3/+3
| | | | llvm-svn: 176763
* We need a shndx if the number of sections breaks SHN_LORESERVE. This conditionNick Lewycky2013-03-091-1/+1
| | | | | | for choosing to emit a shndx was simply testing the wrong variable. llvm-svn: 176762
OpenPOWER on IntegriCloud