Here's what I have read about the JVM. HotSpot is stack based and Dalvik is register based. If HotSpot is stack based, why do we need t have register allocation done once we have IT respresentation of code into Blocks?
Also, where does llvm fit into this? I read that we can use llvm core and backend for java source code. Does HotSpot use LLVM?
HotSpot is not stack-based, the standard java bytecode is. HotSpot is an optimizing runtime which is allowed to use any trick imaginable to quickly execute code implementing the operational semantics of the stack-based machine defined by the JVM specification. Since all relevant CPU architectures are register-oriented, naturally HotSpot will exploit that and use register allocation.
HotSpot does not use llvm, it is an independent development. As far as I can see, there is an llvm-based JVM implementation called J3, unrelated to HotSpot.