Skip to content

Comments

draft: handle nested lambdas#232

Draft
johnbowen42 wants to merge 4 commits intomainfrom
feature/bowen/support-nested-lambda-spec
Draft

draft: handle nested lambdas#232
johnbowen42 wants to merge 4 commits intomainfrom
feature/bowen/support-nested-lambda-spec

Conversation

@johnbowen42
Copy link
Collaborator

No description provided.

@github-actions
Copy link
Contributor

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format (v18.1.3) reports: 4 file(s) not formatted
  • include/proteus/Cloning.h
  • src/lib/JitEngineHost.cpp
  • tests/gpu/lambda_def.cpp
  • tests/gpu/lambda_def_nested.cpp
clang-tidy (v18.1.3) reports: 5 concern(s)
  • include/proteus/TransformLambdaSpecialization.hpp:60:21: warning: [readability-identifier-naming]

    invalid case style for variable 'name'

       60 |     llvm::StringRef name = F->getName();
          |                     ^~~~
          |                     Name
       61 |     return name.contains("_ZZ") && name.contains("clE");
          |            ~~~~                    ~~~~
          |            Name                    Name
  • include/proteus/TransformLambdaSpecialization.hpp:74:15: warning: [readability-identifier-naming]

    invalid case style for variable 'slot'

       74 |           int slot = CI->getZExtValue();
          |               ^~~~
          |               Slot
       75 |           if (NestedLambdaType == GEP->getSourceElementType()) {
       76 |             GEPIntoNestedLambda[GEP] = slot;
          |                                        ~~~~
          |                                        Slot
       77 |           } else if (GEP->getPointerOperand() == LambdaClass) {
       78 |             // Can this be broken? Is it more reliable for this check to be by
       79 |             // type?
       80 |             GEPIntoBaseLambda[GEP] = slot;
          |                                      ~~~~
          |                                      Slot
  • include/proteus/TransformLambdaSpecialization.hpp:129:23: warning: [readability-identifier-naming]

    invalid case style for variable 'visited'

      129 |     DenseSet<Value *> visited;
          |                       ^~~~~~~
          |                       Visited
      130 |     while (!Worklist.empty()) {
      131 |       auto &[Val, Ty] = Worklist.front();
      132 |       llvm::outs() << "USE OF ALLOCATED CLASS " << *Val << "\n";
      133 |       Worklist.pop();
      134 |       if (visited.contains(Val)) {
          |           ~~~~~~~
          |           Visited
      135 |         continue;
      136 |       }
      137 |       visited.insert(Val);
          |       ~~~~~~~
          |       Visited
  • include/proteus/TransformLambdaSpecialization.hpp:153:65: warning: [readability-identifier-naming]

    invalid case style for parameter 'to_visit'

      153 |                            std::queue<std::pair<Value *, int>> &to_visit,
          |                                                                 ^~~~~~~~
          |                                                                 ToVisit
      154 |                            DenseMap<int, int> &NestedToBaseIndex,
      155 |                            const SmallVector<RuntimeConstant> &RCVec) {
      156 |     DenseMap<Value *, int> ValToSlot;
      157 |     DenseSet<Value *> visited;
      158 | 
      159 |     while (!to_visit.empty()) {
      160 |       auto [CurUser, slot] = to_visit.front();
      161 |       to_visit.pop();
          |       ~~~~~~~~
          |       ToVisit
  • include/proteus/TransformLambdaSpecialization.hpp:157:23: warning: [readability-identifier-naming]

    invalid case style for variable 'visited'

      157 |     DenseSet<Value *> visited;
          |                       ^~~~~~~
          |                       Visited
      158 | 
      159 |     while (!to_visit.empty()) {
      160 |       auto [CurUser, slot] = to_visit.front();
      161 |       to_visit.pop();
      162 |       if (visited.contains(CurUser))
          |           ~~~~~~~
          |           Visited
      163 |         continue;
      164 |       llvm::outs() << "processing " << *CurUser << "SLOT = " << slot << "\n";
      165 |       visited.insert(CurUser);
          |       ~~~~~~~
          |       Visited

Have any feedback or feature suggestions? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant