Displaying 5 results from an estimated 5 matches for "intinit".
2020 Oct 01
3
Creating a global variable for a struct array
...= ConstantDataArray::getString(M.getContext(), "myfile.txt");
Constant *filenmConst = new GlobalVariable(M, filenmInit->getType(), false,
GlobalVariable::ExternalLinkage, filenmInit, ".filenm");
//create global variable for int
Constant* intInit = ConstantInt::get(Type::getInt32Ty(M.getContext()), 10);
Constant* intConst = new GlobalVariable(M, intInit->getType(), false,
GlobalVariable::ExternalLinkage, intInit, ".int");
//create ConstantStruct for each hashtable entry
Constant *dhas...
2017 Jul 27
2
Are there some strong naming conventions in TableGen?
...----------------------------------------
While looking the DAGISelMatcherGen.cpp around line 286 (version 3.8.0), I've found such a kind of code
-------------------------------------------------------------------------------------------------
// Direct match against an integer constant.
if (IntInit *II = dyn_cast<IntInit>(N->getLeafValue())) {
// If this is the root of the dag we're matching, we emit a redundant opcode
// check to ensure that this gets folded into the normal top-level
// OpcodeSwitch.
if (N == Pattern.getSrcPattern()) {
const SDNodeInfo &...
2014 Jul 31
2
[LLVMdev] Tablegen binary literals
...t;
> And here’s the other 2 patches. The first sizes binary literals.
>
Regarding this patch, does it need to create a whole new Init class? I
would try to avoid that if at all possible. Could we just have 0b0111 be a
shorthand for a bits<4> BitsInit? Or maybe store some extra data in IntInit?
> The second allows them to initialize multiple bits inside { }. Note that
> i’m only handling certain cases inside the { } initializer. I’m happy to
> refactor the code and handle other cases if necessary.
>
I don't like the special casing going on in this patch. Could we ju...
2020 Oct 01
2
Creating a global variable for a struct array
Thank you very much. The code to initialize h1 to non-zero values was what I was looking for.
It's almost working except for a type mismatch wrt dlist* llist field of h1.
dlist static_lst[10] = { {1, 5, NULL}, ... };
dhash h1[10] = {{"myfile.txt", static_lst}, ... };
Along the lines of the code you had sent, I created a GlobalVariable* llist of type [10 x %struct.dlist]* for the
2014 Jul 31
2
[LLVMdev] Tablegen binary literals
On Thu, Jul 31, 2014 at 12:28 AM, Adam Nemet <anemet at apple.com> wrote:
>
> On Jul 30, 2014, at 10:56 PM, Pete Cooper <peter_cooper at apple.com> wrote:
>
> Hi Adam
>
> On Jul 30, 2014, at 10:28 PM, Adam Nemet <anemet at apple.com> wrote:
>
> Hi Pete,
>
> Just to clarify, are you proposing two things here? First, 0b… literals
> to have type