summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Function.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Two ParamAttrsVectors which differ by a permutationDuncan Sands2007-09-111-0/+4
| | | | | | | | | | of their elements do not yield the same ParamAttrsList, though they should. On the other hand, everyone seems to pass such vectors with elements ordered by increasing index, so rather than sorting the elements simply assert that the elements are ordered in this way. llvm-svn: 41845
* When Intrinsic::getName is constructing names for overloaded intrinsics,Dan Gohman2007-08-201-1/+2
| | | | | | | | use the ValueType name instead of the llvm type name, to match what the verifier expects. For integers these are the same, but for floating-point values the intrinsics use f32/f64 instead of float/double. llvm-svn: 41189
* Compute the argument list as lazily as possible. This ensures that clientsChris Lattner2007-08-181-7/+24
| | | | | | | | that don't use it don't have to pay the memory cost for the arguments. This allows us to avoid creating Argument nodes for many prototypes and for clients who lazily deserialize code from a bytecode file. llvm-svn: 41166
* Support for trampolines, except for X86 codegen which isDuncan Sands2007-07-271-0/+2
| | | | | | still under discussion. llvm-svn: 40549
* For PR1553:Reid Spencer2007-07-191-2/+2
| | | | | | | | Change the keywords for the zext and sext parameter attributes to be zeroext and signext so they don't conflict with the keywords for the instructions of the same name. This gets around the ambiguity. llvm-svn: 40069
* Add the byval attributeRafael Espindola2007-07-061-0/+2
| | | | llvm-svn: 37940
* Fix a user-reported error building with GCC 3.4.4 on Cygwin.Chris Lattner2007-06-051-1/+1
| | | | llvm-svn: 37445
* Commit first round work of PR1373. "noalias" is now fully supported inZhou Sheng2007-06-051-0/+2
| | | | | | | VMCore, BitCode, and Assembly. Documentation and test case paramattrs.ll updated also. llvm-svn: 37432
* simplify some codeChris Lattner2007-04-251-5/+2
| | | | llvm-svn: 36427
* For PR1136:Reid Spencer2007-04-221-0/+18
| | | | | | | Add reference counting to ParamAttrsList and make use of it in Function, CallInst and InvokeInst classes. llvm-svn: 36346
* For PR1146:Reid Spencer2007-04-221-27/+22
| | | | | | | | Make ParamAttrsList objects unique. You can no longer directly create or destroy them but instead must go through the ParamAttrsList::get() interface. llvm-svn: 36327
* merge several fields in GlobalValue to use the same word, move CallingConvChris Lattner2007-04-171-1/+0
| | | | | | | | | field into SubclassData in Value. This shrinks GlobalVAlue from 48->40 bytes, Function from 88->76, and GlobalVariable from 76->68. This trims 4640 bytes off my testcase, reading a bc file without materializing any functions. llvm-svn: 36192
* The (negative) offset from a SymbolTableListTraits-using ilist to its containerChris Lattner2007-04-171-2/+0
| | | | | | | | | object is always constant. As such, evaluate it at compile time instead of storing it as an ivar in SymbolTableListTraits. This shrinks every SymbolTableListTraits ilist by a word, shrinking BasicBlock from 44->40 bytes, Function from 96->88 bytes, and Module from 60->52 bytes. llvm-svn: 36189
* Refactor SymbolTableListTraits to only have a single pointer in it, insteadChris Lattner2007-04-171-5/+2
| | | | | | | | of two. This shrinkifies Function by 8 bytes (104->96) and Module by 8 bytes (68->60). On a testcase of mine, this reduces the memory used to read a module header from 565680b to 561024, a little over 4K. llvm-svn: 36188
* Don't return 0 if the len == 5, let the assert handle that case.Reid Spencer2007-04-161-1/+1
| | | | | | Thanks, Chris. llvm-svn: 36139
* Fix test/CodeGen/Generic/vector-constantexpr.llReid Spencer2007-04-161-0/+2
| | | | llvm-svn: 36123
* For PR1328:Reid Spencer2007-04-161-3/+4
| | | | | | | | Don't assert everytime an intrinsic name isn't recognized. Instead, make the assert optional when callin getIntrinsicID(). This allows the assembler to handle invalid intrinsic names gracefully. llvm-svn: 36120
* For PR1146:Reid Spencer2007-04-111-8/+8
| | | | | | | Put the parameter attributes in their own ParamAttr name space. Adjust the rest of llvm as a result. llvm-svn: 35877
* For PR1146:Reid Spencer2007-04-091-0/+64
| | | | | | | * Add ParamAttrList pointers to Function and CallInst. * Move the implementation of ParamAttrList from Type.cpp to Function.cpp llvm-svn: 35818
* For PR1146:Reid Spencer2007-04-091-2/+2
| | | | | | Parameter attributes can now be defaulted for intrinsics. llvm-svn: 35809
* For PR1297:Reid Spencer2007-04-011-5/+14
| | | | | | | | | | Implement "actual" argument types for the Intrinsic member functions. This involves changing the getName, getType, and getDeclaration methods to have optional parameters for the actual types. These are necessary in order for the type/name to be constructed properly for overloaded intrinsics. Only the caller knows the actual argument types desired. llvm-svn: 35541
* Implement Function::getIntrinsicID without it needing to call Value::getName,Chris Lattner2007-02-151-3/+6
| | | | | | which allocates a string. This speeds up instcombine on 447.dealII by 5%. llvm-svn: 34318
* Switch ValueSymbolTable to use StringMap<Value*> instead of ↵Chris Lattner2007-02-121-1/+2
| | | | | | | | | std::map<std::string, Value*> as its main datastructure. There are many improvements yet to be made, but this speeds up opt --std-compile-opts on 447.dealII by 7.3%. llvm-svn: 34193
* Automatically generating intrinsic declarations from Dan Gohman. ModifiedJim Laskey2007-02-071-0/+19
| | | | | | | to construct FunctionType in separate function, and, have getDeclaration return a Function instead of a Constant. llvm-svn: 34008
* For PR411:Reid Spencer2007-02-051-4/+2
| | | | | | | | | | This patch replaces the SymbolTable class with ValueSymbolTable which does not support types planes. This means that all symbol names in LLVM must now be unique. The patch addresses the necessary changes to deal with this and removes code no longer needed as a result. This completes the bulk of the changes for this PR. Some cleanup patches will follow. llvm-svn: 33918
* For PR645:Reid Spencer2007-01-261-39/+0
| | | | | | | Remove the Function::renameLocalSymbols function as it is no longer needed. llvm-svn: 33522
* For PR411:Reid Spencer2007-01-061-2/+2
| | | | | | | | | Take an incremental step towards type plane elimination. This change separates types from values in the symbol tables by finally making use of the TypeSymbolTable class. This yields more natural interfaces for dealing with types and unclutters the SymbolTable class. llvm-svn: 32956
* For PR950:Reid Spencer2006-12-311-1/+1
| | | | | | Change signed integer type names to unsigned equivalents. llvm-svn: 32780
* For PR950:Reid Spencer2006-11-271-2/+2
| | | | | | | | | | The long awaited CAST patch. This introduces 12 new instructions into LLVM to replace the cast instruction. Corresponding changes throughout LLVM are provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the exception of 175.vpr which fails only on a slight floating point output difference. llvm-svn: 31931
* Remove unused variable.Reid Spencer2006-11-021-1/+1
| | | | llvm-svn: 31376
* Implement Intrinsic::getNameChris Lattner2006-03-251-0/+11
| | | | llvm-svn: 27108
* Use the function name matcher autogenerated from the .td file.Chris Lattner2006-03-091-76/+3
| | | | llvm-svn: 26664
* remove dbg_declare, it's not used yet.Chris Lattner2006-03-091-1/+0
| | | | llvm-svn: 26659
* remove the read/write port/io intrinsics.Chris Lattner2006-03-031-6/+0
| | | | llvm-svn: 26479
* Split memcpy/memset/memmove intrinsics into i32/i64 versions, resolvingChris Lattner2006-03-021-3/+6
| | | | | | | | | | | PR709, and paving the way for future progress. Significantly refactor autoupgrading code, to handle the more complex case (where we upgrade one argument in a function), and fix some bugs in it. Testcase here: llvm/test/Regression/Bytecode/memcpy.ll llvm-svn: 26474
* For PR411:Reid Spencer2006-01-161-42/+56
| | | | | | | | | | | | | | | | This patch is an incremental step towards supporting a flat symbol table. It de-overloads the intrinsic functions by providing type-specific intrinsics and arranging for automatically upgrading from the old overloaded name to the new non-overloaded name. Specifically: llvm.isunordered -> llvm.isunordered.f32, llvm.isunordered.f64 llvm.sqrt -> llvm.sqrt.f32, llvm.sqrt.f64 llvm.ctpop -> llvm.ctpop.i8, llvm.ctpop.i16, llvm.ctpop.i32, llvm.ctpop.i64 llvm.ctlz -> llvm.ctlz.i8, llvm.ctlz.i16, llvm.ctlz.i32, llvm.ctlz.i64 llvm.cttz -> llvm.cttz.i8, llvm.cttz.i16, llvm.cttz.i32, llvm.cttz.i64 New code should not use the overloaded intrinsic names. Warnings will be emitted if they are used. llvm-svn: 25366
* add a missing break that Reid noticed.Chris Lattner2006-01-151-0/+1
| | | | llvm-svn: 25328
* Add bswap intrinsics as documented in the Language ReferenceNate Begeman2006-01-141-0/+5
| | | | llvm-svn: 25309
* Add recognition and verification of new llvm.stacksave/llvm.stackrestore ↵Chris Lattner2006-01-131-4/+6
| | | | | | intrinsics llvm-svn: 25266
* continued readcyclecounter supportAndrew Lenharth2005-11-111-3/+4
| | | | llvm-svn: 24300
* add support for explicit calling conventionsChris Lattner2005-05-061-0/+1
| | | | llvm-svn: 21746
* Implement count leading zeros (ctlz), count trailing zeros (cttz), and countAndrew Lenharth2005-05-031-0/+5
| | | | | | | | | population (ctpop). Generic lowering is implemented, however only promotion is implemented for SelectionDAG at the moment. More coming soon. llvm-svn: 21676
* Add llvm.sqrt intrinsic, patch contributed by Morten OfstadChris Lattner2005-04-301-0/+1
| | | | llvm-svn: 21627
* Remove trailing whitespaceMisha Brukman2005-04-211-8/+8
| | | | llvm-svn: 21427
* First step in adding pcmarker intrinsic. Second step (soon) is adding ↵Andrew Lenharth2005-03-281-0/+1
| | | | | | backend support. llvm-svn: 20900
* remove all of the various setName implementations, consolidating them intoChris Lattner2005-03-051-17/+0
| | | | | | Value::setName, which is no longer virtual. llvm-svn: 20464
* Remove the 2nd argument to Value::setNameChris Lattner2005-03-051-7/+3
| | | | llvm-svn: 20458
* recognize llvm.prefetch. Patch contributed by Justin Wick!Chris Lattner2005-02-281-0/+3
| | | | llvm-svn: 20377
* Improve conformance with the Misha spelling benchmark suiteChris Lattner2005-01-301-2/+2
| | | | llvm-svn: 19930
* Adjust to ilist changes.Chris Lattner2005-01-291-2/+2
| | | | llvm-svn: 19923
OpenPOWER on IntegriCloud