search for: getkind

Displaying 20 results from an estimated 35 matches for "getkind".

Did you mean: get_kind
2018 May 03
3
RFC: virtual-like methods via LLVM-style RTTI
...// void LLVM_ABSTRACT_VIRTUAL(BaseTy, makeSound) // // And then later in the header file, the vtable definition: // // LLVM_ABSTRACT_VIRTUAL_BEGIN(BaseTy, makeSound) // #define BASE_NODE(Ty, ...) LLVM_ABSTRACT_VIRTUAL_SLOT(Ty, makeSound) // #include <BaseTy.inc> // LLVM_ABSTRACT_VIRTUAL_END(getKind()) // // // Example: // // class Cat { // ... // // void LLVM_ABSTRACT_VIRTUAL(Base, makeSound) // // LLVM_BASE_VIRTUAL(Base, getOffspringCount) // size_t LLVM_VIRTUAL(getOffspringCount)() const { // return 0; // } // }; // // // class Lion : public Cat { // ... // // LLVM_VIRTUAL...
2012 Jan 25
0
[LLVMdev] [PATCH] TLS support for Windows 32+64bit
...lso refined an assert statement. Applies cleanly > to r148473 now. Are there more comments on the code? Thank you!! + assert(Inst.getOperand(0).isReg() && + (Inst.getOperand(ImmOp).isImm() || + (Inst.getOperand(ImmOp).isExpr() && + Inst.getOperand(ImmOp).getExpr()->getKind() == MCExpr::SymbolRef) && + static_cast<const MCSymbolRefExpr*>(Inst.getOperand(ImmOp).getExpr())->getKind() == MCSymbolRefExpr::VK_SECREL) && Just asserting "Inst.getOperand(ImmOp).isImm() || (Inst.getOperand(ImmOp).isExpr()" should be sufficient here; in th...
2012 Jan 19
2
[LLVMdev] [PATCH] TLS support for Windows 32+64bit
Hi! I added 2 more tests and also refined an assert statement. Applies cleanly to r148473 now. Are there more comments on the code? Thank you!! Regards Kai On 01.01.2012 22:01, Eli Friedman wrote: > On Sun, Jan 1, 2012 at 10:44 AM, Kai<kai at redstar.de> wrote: >> Happy new year to all! >> >> The attached patch adds TLS support for x86_64-pc-win32 and x86-pc-win32.
2011 Mar 18
2
[LLVMdev] Text or Data symbol
...>(Op); const GlobalValue *GV = GSDN->getGlobal(); GV->hasSection() and GV->getSection() But the section is not set at this stage (hasSection = false) And at the AsmPrinter stage: const GlobalValue *GV = MO.getGlobal(); SectionKind sectionKind = Mang->getSymbol(GV)->getSection().getKind(); But again the section does not seem to be set (sectionKind.isInSection() = false) Do you know a way to tell if a global address corresponds to data or code ? I have to process differently text and data address... Thank you ! Damien -------------- next part -------------- An HTML attachmen...
2010 Feb 11
0
[LLVMdev] Metadata
On Wednesday 10 February 2010 14:58:58 Dan Gohman wrote: > On Feb 10, 2010, at 12:42 PM, David Greene wrote: > > On Wednesday 10 February 2010 12:58:25 Chris Lattner wrote: > >> I think that adding a bit to LoadSDNode and StoreSDNode would make > >> sense. > > > > Ok. The consequence is that a number of functions will have to change to > > propagate
2011 Nov 17
1
[LLVMdev] How to get ELF section virtual starting address from MCSymbolRefExpr?
...Expr) is the offset from the beginning of the section. The need is to combine that offset to the virtual address of the section it belongs, in this case .text, but it could be any section. I can get a MCSectionELF class object from MCSymbol that I get from MCSymbolRefExpr: int Kind = Value->getKind(); if (Kind == MCExpr::SymbolRef) { const MCSymbol &Sym = SRE->getSymbol(); const MCSectionELF = dyn_cast_or_null<MCSectionELF>(Sym.getSection()); } But can't see how to get the virtual address of the section. This is odd since I would have expected methods for accessi...
2013 Sep 25
1
[LLVMdev] arm64 / iOS support
...rwinAArch64AsmBackend(const Target &T, const StringRef TT, uint8_t _OSABI) + : AArch64AsmBackend(T, TT) {} + bool mayNeedRelaxation(const MCInst &) const { return false; } + + virtual bool doesSectionRequireSymbols(const MCSection &Section) const { + SectionKind kind = Section.getKind(); + return kind.isDataRel() || kind.isReadOnlyWithRel() || kind.isMetadata() || + kind.isMergeableConst(); + } + + unsigned int getNumFixupKinds() const { return AArch64::NumTargetFixupKinds; } + + bool fixupNeedsRelaxation(const MCFixup &Fixup, uint64_t Value, +...
2010 Feb 10
3
[LLVMdev] Metadata
On Feb 10, 2010, at 12:42 PM, David Greene wrote: > On Wednesday 10 February 2010 12:58:25 Chris Lattner wrote: > >> I think that adding a bit to LoadSDNode and StoreSDNode would make sense. > > Ok. The consequence is that a number of functions will have to change to > propagate this bit, analogous to what happens with isVolatile. It's > essentially what we do
2011 Mar 21
0
[LLVMdev] Text or Data symbol
...GV = GSDN->getGlobal(); > GV->hasSection() and GV->getSection() > But the section is not set at this stage (hasSection = false) > > And at the AsmPrinter stage: > const GlobalValue *GV = MO.getGlobal(); > SectionKind sectionKind = Mang->getSymbol(GV)->getSection().getKind(); > But again the section does not seem to be set (sectionKind.isInSection() = > false) > > Do you know a way to tell if a global address corresponds to data or code ? > I have to process differently text and data address... > > Thank you ! > > Damien > > -----...
2016 Oct 25
2
[Help] Add custom pragma
...low. As far as I know, the attribute for loop unroll pragma gets serviced at ProcessSmtAttrbute Function @ tools/clang/lib/Sema/SemaStmtAttr.cpp. It contains switch statement like below. ProcessSmtAttrbute @ tools/clang/lib/Sema/SemaStmtAttr.cpp // A : AttributeList - passed by argument switch( A.getKind() ) { case AttributeList::UnknownAttribute: ~ case AttributeList::AT_FallThrough: return ~ case AttributeList::AT_LoopHint: return handleLoopHintAttr( ~ ) case AttributeList::AT_OpenCLUnrollHint: ~ ... } As I want to define new attribute, I've tried to find where the de...
2010 Feb 11
3
[LLVMdev] Metadata
...true if it ate an excess comma at the /// end. bool LLParser::ParseOptionalCommaAlign(unsigned &Alignment, bool &AteExtraComma) { AteExtraComma = false; while (EatIfPresent(lltok::comma)) { // Metadata at the end is an early exit. if (Lex.getKind() == lltok::MetadataVar) { AteExtraComma = true; return false; } if (Lex.getKind() == lltok::kw_align) { if (ParseOptionalAlignment(Alignment)) return true; } else return true; } return false; } Either ParseLoad and probably other instructions need to...
2008 Jun 11
3
help with test design
I''m having trouble figuring out how to drive the design of a class. I''m hoping I can get a hint or two from the more experienced BDDers on this list. I''m writing an adapter class that sits between a 3rd party library and my business logic. I would like to extract some information from objects available from the 3rd party lib and covert them into ruby objects.
2018 May 04
0
RFC: virtual-like methods via LLVM-style RTTI
On 3 May 2018, at 22:09, David Zarzycki via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hello, > > In an effort to help LLVM-style projects save memory, I’ve been toying with some macros that provide an alternative to C++ vtables that use LLVM-style RTTI design patterns instead. Is this something that LLVM or sub-projects think is worth pursuing? Or are the macros below
2011 Mar 21
1
[LLVMdev] Text or Data symbol
...bal(); > GV->hasSection() and GV->getSection() > But the section is not set at this stage (hasSection = false) > > And at the AsmPrinter stage: > const GlobalValue *GV = MO.getGlobal(); > SectionKind sectionKind = Mang->getSymbol(GV)->getSection().getKind(); > But again the section does not seem to be set > (sectionKind.isInSection() = false) > > Do you know a way to tell if a global address corresponds to data > or code ? I have to process differently text and data address... > > Thank you ! > >...
2016 Oct 25
2
[Help] Add custom pragma
...pragma gets serviced at > ProcessSmtAttrbute Function @ tools/clang/lib/Sema/SemaStmtAttr.cpp. > > It contains switch statement like below. > > > > ProcessSmtAttrbute @ tools/clang/lib/Sema/SemaStmtAttr.cpp > > // A : AttributeList - passed by argument > > switch( A.getKind() ) { > > case AttributeList::UnknownAttribute: > > ~ > > case AttributeList::AT_FallThrough: > > return ~ > > case AttributeList::AT_LoopHint: > > return handleLoopHintAttr( ~ ) > > case AttributeList::AT_OpenCLUnrollHint: > > ~...
2013 Feb 06
0
[LLVMdev] [llvm] r174463 - Initial support for DWARF CFI parsing and dumping in LLVM
...+ >> +class llvm::FrameEntry { >> +public: >> + enum FrameKind {FK_CIE, FK_FDE}; >> + FrameEntry(FrameKind K, DataExtractor D, uint64_t Offset, uint64_t Length) >> + : Kind(K), Data(D), Offset(Offset), Length(Length) >> + {} >> + >> + FrameKind getKind() const { return Kind; } >> + >> + virtual void dumpHeader(raw_ostream &OS) const = 0; >> +protected: >> + const FrameKind Kind; >> + DataExtractor Data; >> + uint64_t Offset; >> + uint64_t Length; >> +}; >> + >> + >> +class...
2016 Oct 25
0
[Help] Add custom pragma
...roll pragma gets serviced at ProcessSmtAttrbute Function @ tools/clang/lib/Sema/SemaStmtAttr.cpp. > > It contains switch statement like below. > > > > ProcessSmtAttrbute @ tools/clang/lib/Sema/SemaStmtAttr.cpp > > // A : AttributeList - passed by argument > > switch( A.getKind() ) { > > case AttributeList::UnknownAttribute: > > ~ > > case AttributeList::AT_FallThrough: > > return ~ > > case AttributeList::AT_LoopHint: > > return handleLoopHintAttr( ~ ) > > case AttributeList::AT_OpenCLUnrollHint: > > ~...
2012 Apr 21
0
[LLVMdev] Remove function from module
...d be dropped by now. if (V->HasValueHandle) { #ifndef NDEBUG // Only in +Asserts mode... dbgs() << "While deleting: " << *V->getType() << " %" << V->getNameStr() << "\n"; if (pImpl->ValueHandles[V]->getKind() == Assert) llvm_unreachable("An asserting value handle still pointed to this " value!"); #endif llvm_unreachable("All references to V were not removed?"); } Yours sincerely, Kadysev Mikhail 22.04.2012, в 1:41, Dmitry N. Mikushin напис...
2012 Apr 01
0
[LLVMdev] SIV tests in LoopDependence Analysis, Sanjoy's patch
...ng dependencies between two Values: class Dependence { public: struct Level { enum { LT = 1, EQ = 2, GT = 4, ALL = 7 } direction; bool scalar; const SCEV *distance; // NULL implies no distance available const Loop *loop; }; enum Kind { Flow, Anti, Output, Input }; Kind getKind() const { return kind; } const Value *getSource() const { return source; } const Value *getDestination() const { return destination; } typedef SmallVector<const Level *, 4>::const_iterator const_iterator; const_iterator begin() const { return levels.begin(); } c...
2013 Dec 12
3
[LLVMdev] [RFC PATCH 1/2] x86: Fix ModR/M byte output in 16-bit addressing mode
This attempts to address http://llvm.org/bugs/show_bug.cgi?id=18220 It also fixes a test which was requiring the *wrong* output. I'm relatively happy with this part, and it even solves most of the hard part of feature request for .code16 in bug 8684 — which was actually why I started prodding at this. But I could do with some help with the 16-bit signed relocation handling, which I've